diff --git a/proxmenu-scripts.sh b/proxmenu-scripts.sh index ff5c395..9414eb2 100755 --- a/proxmenu-scripts.sh +++ b/proxmenu-scripts.sh @@ -219,7 +219,7 @@ RESTART_PVE_SERVICES(){ } MAINTENANCE_MODE(){ - if ha-manager status | grep "maintenance mode"; then + 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]} " else echo -en "${idsCL[LightCyan]}qPut the local host into maintenance mode (Y/n)?${idsCL[Default]} " @@ -228,7 +228,7 @@ MAINTENANCE_MODE(){ case "$choice" in [Nn]) echo;; *) echo - if ha-manager status | grep "maintenance mode"; then + if ha-manager status | grep "maintenance mode" &> /dev/null; 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 @@ -300,7 +300,7 @@ MAIN_MENU() { echo -e "${idsCL[DarkGray]} [S] ScreenConnect is already installed${idsCL[Default]}" fi echo - if ha-manager status | grep "maintenance mode"; then + if ha-manager status | grep "maintenance mode" &> /dev/null; then echo -e " [${idsCL[LightYellow]}M${idsCL[Default]}] ${idsCL[White]}Take Host out of Maintenance Mode${idsCL[Default]}" else echo -e " [${idsCL[LightYellow]}M${idsCL[Default]}] ${idsCL[White]}Put Host into Maintenance Mode${idsCL[Default]}"