Fixed releaseUpgrade scripts
Updated Debian upgrade commands to be beter suited for scirpts Set command timeout to 0 for VM's Fixed container reboots Disabled Debian VM's upgrades - qemu-guest-agent quit while upgrading Checking if ID is alive before asking its distro
This commit is contained in:
@@ -34,16 +34,17 @@ if ! $IdExists; then echo "This ID does not exist"; exit; fi
|
||||
#Check type of ID
|
||||
if [[ $VMS =~ $ID ]];then
|
||||
TYPE=VM;
|
||||
DIST=$(qm guest exec $VMID -- awk -F= '$1=="ID" { print $2 ;}' /etc/os-release | jq '.["out-data"]')
|
||||
if ! $(VM-State $ID); then echo "This ID is not runnig"; exit; fi
|
||||
DIST=$(qm guest exec $ID -- awk -F= '$1=="ID" { print $2 ;}' /etc/os-release | jq '.["out-data"]')
|
||||
fi
|
||||
if [[ $CTS =~ $ID ]]; then
|
||||
TYPE=CT
|
||||
DIST=$(pct exec $CTID -- awk -F= '$1=="ID" { print $2 ;}' /etc/os-release)
|
||||
#Check if CT is running
|
||||
if ! $(CT-State $ID); then echo "This ID is not runnig"; exit; fi
|
||||
#Get CT distro
|
||||
DIST=$(pct exec $ID -- awk -F= '$1=="ID" { print $2 ;}' /etc/os-release)
|
||||
fi
|
||||
|
||||
#Check if VM/CT is running
|
||||
if ! $($TYPE-State $ID); then echo "This ID is not runnig"; exit; fi
|
||||
|
||||
#Check wich distro the CT/VM is running
|
||||
if [[ "${DIST}" == *"debian"* ]]; then
|
||||
#Ask the wanted Debian version
|
||||
|
||||
Reference in New Issue
Block a user