From 285241081b0a14d5f4aab43b964c1a36c3ca953d Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 7 Mar 2026 18:34:41 -0600 Subject: [PATCH] Update proxmenu-scripts.sh --- proxmenu-scripts.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/proxmenu-scripts.sh b/proxmenu-scripts.sh index 8289f9a..4f4d8a8 100755 --- a/proxmenu-scripts.sh +++ b/proxmenu-scripts.sh @@ -219,16 +219,18 @@ RESTART_PVE_SERVICES(){ } MAINTENANCE_MODE(){ - if ha-manager status | grep -q "maintenance-mode"; then - echo -en "${idsCL[LightCyan]}Take the local host out of maintenance mode (Y/n)?${idsCL[Default]} " - else - echo -en "${idsCL[LightCyan]Put the local host into maintenance mode (Y/n)?${idsCL[Default]} " - fi + read -n 1 choice case "$choice" in [Nn]) echo;; *) echo - + if ha-manager status | grep -q "maintenance-mode"; then + ha-manager crm-command node-maintenance disable $(hostname) & + echo -e "\n${idsCL[Green]}This host will be taken out of maintenance mode${idsCL[Default]}\n" + else + ha-manager crm-command node-maintenance enable $(hostname) & + echo -e "\n${idsCL[Green]}This host will be entered into maintenance mode${idsCL[Default]}\n" + fi [ ${action-x} ] && exit 0 || ENTER2CONTINUE ;; esac