added check for vm or lxc for qemu-guest-agent
This commit is contained in:
Vendored
+16
-2
@@ -50,6 +50,20 @@ apt-get remove os-prober -y > /dev/null 2>&1
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get upgrade -y
|
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
|
# 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
|
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
|
rm /opt/cronicle/conf/config.json
|
||||||
wget -qO /opt/cronicle/conf/config.json http://192.168.1.50/files/debian/cronicle-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
|
/opt/cronicle/bin/control.sh start
|
||||||
echo "Cronicle worker is installed."
|
echo "Cronicle worker installed."
|
||||||
else
|
else
|
||||||
echo "Cronicle worker is already installed."
|
echo "Cronicle worker already installed."
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -18,8 +18,22 @@ apt-get remove os-prober -y
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get upgrade -y
|
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
|
# 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
|
# add akanealw user if not existing
|
||||||
isInFile=$(cat /etc/passwd | grep -c "akanealw")
|
isInFile=$(cat /etc/passwd | grep -c "akanealw")
|
||||||
|
|||||||
Reference in New Issue
Block a user