added check for vm or lxc for qemu-guest-agent
This commit is contained in:
18
debian/debian-essentials.sh
vendored
18
debian/debian-essentials.sh
vendored
@@ -50,6 +50,20 @@ apt-get remove os-prober -y > /dev/null 2>&1
|
||||
apt-get update
|
||||
apt-get upgrade -y
|
||||
|
||||
# check if vm or lxc
|
||||
if [[ ! -d /dev/disk/by-id ]]
|
||||
then
|
||||
apt-get install -y qemu-guest-agent
|
||||
else
|
||||
isInFile=$(ls /dev/disk/by-id | grep -c "QEMU")
|
||||
if [ $isInFile -eq 0 ]
|
||||
then
|
||||
apt-get remove -y qemu-guest-agent
|
||||
else
|
||||
apt-get install -y qemu-guest-agent
|
||||
fi
|
||||
fi
|
||||
|
||||
# download and install packages
|
||||
apt-get install -y 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
|
||||
|
||||
@@ -223,7 +237,7 @@ if [ $isInFile -eq 0 ]
|
||||
rm /opt/cronicle/conf/config.json
|
||||
wget -qO /opt/cronicle/conf/config.json http://192.168.1.50/files/debian/cronicle-config.json
|
||||
/opt/cronicle/bin/control.sh start
|
||||
echo "Cronicle worker is installed."
|
||||
echo "Cronicle worker installed."
|
||||
else
|
||||
echo "Cronicle worker is already installed."
|
||||
echo "Cronicle worker already installed."
|
||||
fi
|
||||
|
||||
@@ -18,8 +18,22 @@ apt-get remove os-prober -y
|
||||
apt-get update
|
||||
apt-get upgrade -y
|
||||
|
||||
# check if vm or lxc
|
||||
if [[ ! -d /dev/disk/by-id ]]
|
||||
then
|
||||
apt-get install -y qemu-guest-agent
|
||||
else
|
||||
isInFile=$(ls /dev/disk/by-id | grep -c "QEMU")
|
||||
if [ $isInFile -eq 0 ]
|
||||
then
|
||||
apt-get remove -y qemu-guest-agent
|
||||
else
|
||||
apt-get install -y qemu-guest-agent
|
||||
fi
|
||||
fi
|
||||
|
||||
# download and install packages
|
||||
apt-get install -y ncdu pwgen 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 ncdu pwgen 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
|
||||
|
||||
# add akanealw user if not existing
|
||||
isInFile=$(cat /etc/passwd | grep -c "akanealw")
|
||||
|
||||
Reference in New Issue
Block a user