changed qemu lxc check

This commit is contained in:
2024-03-14 18:10:16 -05:00
parent 43e9dd48ce
commit bb42d87aa5

View File

@@ -51,18 +51,12 @@ apt-get update
apt-get upgrade -y apt-get upgrade -y
# check if vm or lxc # check if vm or lxc
if [[ ! -d /dev/disk/by-id ]] if [[ -f /dev/.lxc-boot-id ]]
then
apt-get install -y qemu-guest-agent
else
isInFile=$(ls /dev/disk/by-id | grep -c "QEMU")
if [ $isInFile -eq 0 ]
then then
apt-get remove -y qemu-guest-agent apt-get remove -y qemu-guest-agent
else else
apt-get install -y qemu-guest-agent apt-get install -y qemu-guest-agent
fi fi
fi
# download and install packages # download and install packages
apt-get install -y restic hstr htop ncdu pwgen lsb-release cron qemu-guest-agent sudo nano curl wget zip unzip git rsync man-db cifs-utils nfs-common parted libtalloc2 libwbclient0 net-tools gnupg apt-transport-https tmux gdisk bash-completion apt-get install -y restic hstr htop ncdu pwgen lsb-release cron qemu-guest-agent sudo nano curl wget zip unzip git rsync man-db cifs-utils nfs-common parted libtalloc2 libwbclient0 net-tools gnupg apt-transport-https tmux gdisk bash-completion