From 1297502b9aceba7ac4cd68e0755cfe63a24cff3b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 28 Apr 2026 15:49:06 -0500 Subject: [PATCH] update --- defaults.inc | 2 +- proxmenu-scripts.sh | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/defaults.inc b/defaults.inc index 2d18e99..32d1555 100755 --- a/defaults.inc +++ b/defaults.inc @@ -3,7 +3,7 @@ action="$1" FOLDER='/opt/idssys/ta-proxmenu' -VERS='2026.4.20-1' +VERS='2026.4.28-1' noupdate=' restart cpu mm ' diff --git a/proxmenu-scripts.sh b/proxmenu-scripts.sh index 85a01aa..49f2259 100755 --- a/proxmenu-scripts.sh +++ b/proxmenu-scripts.sh @@ -237,6 +237,24 @@ RESTART_PVE_SERVICES(){ esac } +SET_VM_SHUTDOWNTIMEOUT(){ + if [ "${1}" == "" ]; then + echo -en "${idsCL[LightCyan]}Would you like to set all VM's shutdown timeout to 180secs (Y/n)?${idsCL[Default]} " + read -n 1 choice + else + choice=${1} + fi + case "${choice}" in + [Nn]) echo;; + *) echo + for vmid in $(pvesh get /cluster/resources --type vm --output-format json | jq '.[].vmid'); do + echo "Updating VM $vmid shutdown timeout to 180 seconds..." + qm set "$vmid" --startup "down=180" + done + ;; + esac +} + MAINTENANCE_MODE(){ if ha-manager status | grep "maintenance mode" &> /dev/null; then echo -en "${idsCL[LightCyan]}Take the local host out of maintenance mode (Y/n)?${idsCL[Default]} " @@ -371,6 +389,7 @@ if [ ${action-x} ]; then restart) RESTART_PVE_SERVICES ${2};; cpu) DETECT_CPU;; mm) MAINTENANCE_MODE;; + timeout) SET_VM_SHUTDOWNTIMEOUT $(2);; *) MAIN_MENU;; esac else