diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 0e513f1d..36ceca9d 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1241,16 +1241,19 @@ SKIP_SERVER_CHECKS(){ systemctl stop keepalived >/dev/null 2>&1 echo -e "${idsCL[Green]}Done${idsCL[Default]}" fi - elif [ "${1}" == "off" ] || [ "${1}" == "reboot" ] || ([ -f ${NM_TMPFOLDER}/.skip ] && [ "${1}" == "" ]); then + elif [ "${1}" == "off" ] || [ "${1}" == "reboot" ] || [ "${1}" == "shutdown" ] || ([ -f ${NM_TMPFOLDER}/.skip ] && [ "${1}" == "" ]); then rm -f ${NM_TMPFOLDER}/.skip echo -e "${idsCL[LightGreen]}Server has been re-enabled for Node-Manager Status Checks${idsCL[Default]}" - if [ "${1}" != "reboot" ] && [ "$(dpkg -l | grep keepalived)" ]; then + if [ "${1}" == "reboot" ]; then + echo -e "\n${idsCL[LightGreen]}Restarting System . . .${idsCL[Default]}\n" + reboot + elif [ "${1}" == "shutdown" ]; then + echo -e "\n${idsCL[LightGreen]}Shutting Down the System . . .${idsCL[Default]}\n" + poweroff + elif [ "$(dpkg -l | grep keepalived)" ]; then echo -en "${idsCL[Green]}Starting${idsCL[LightCyan]} Keepalived ... ${idsCL[Default]}" systemctl start keepalived >/dev/null 2>&1 echo -e "${idsCL[Green]}Done${idsCL[Default]}" - elif [ "${1}" == "reboot" ]; then - echo -e "\n${idsCL[LightGreen]}Restarting System . . .${idsCL[Default]}\n" - reboot fi fi echo