This commit is contained in:
2026-04-28 15:49:06 -05:00
parent 5a48ed3a39
commit 1297502b9a
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -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 '
+19
View File
@@ -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