diff --git a/defaults.inc b/defaults.inc index 96bc67f..e6e3800 100755 --- a/defaults.inc +++ b/defaults.inc @@ -2,7 +2,7 @@ action="$1" FOLDER='/opt/idssys/linupx' -VERS='6.60.44-08172025' +VERS='6.60.45-09152025' IPERFVER="3.15" diff --git a/linupx-scripts.sh b/linupx-scripts.sh index b951034..83d78ec 100755 --- a/linupx-scripts.sh +++ b/linupx-scripts.sh @@ -273,16 +273,33 @@ GO_REBOOT() { fi } SHUTDOWN() { - echo -e "\n${idsCL[LightCyan]}Are you sure you wish to shutdown?${idsCL[Default]}" - echo -en " ${idsCL[White]}(${idsCL[LightGreen]}Y${idsCL[White]})es ${idsCL[LightCyan]}/${idsCL[White]} (${idsCL[LightGreen]}*${idsCL[White]})any other key to cancel${idsCL[Default]}" - read -n 1 -p " : " choice - case "$choice" in - [Yy]) ${adm}shutdown -h now - echo -e "\n\nThe system is now shutting down..." - sleep 60 - exit 0;; - * ) MAIN_MENU;; - esac + if [ -f /opt/idssys/nodemgmt/.tmp/.skip ]; then + echo -e "\n${idsCL[LightCyan]}NodeMgmt Skip is currently enabled: Should we disable that and shutdown, or just shutdown?${idsCL[Default]}" + echo -en " ${idsCL[White]}(${idsCL[LightGreen]}Y${idsCL[White]})es ${idsCL[LightCyan]}/${idsCL[White]} (${idsCL[LightGreen]}S${idsCL[White]})hutdown ${idsCL[LightCyan]}/${idsCL[White]} (${idsCL[LightGreen]}*${idsCL[White]})any other key to cancel${idsCL[Default]}" + read -n 1 -p " : " choice + case "$choice" in + [Yy]) ${adm}/usr/local/bin/nmg skip shutdown + echo 'The system is now shutting down...' + sleep 60 + exit 0;; + [Rr]) ${adm}poweroff + echo 'The system is now shutting down...' + sleep 60 + exit 0;; + * ) MAIN_MENU;; + esac + else + echo -e "\n${idsCL[LightCyan]}Are you sure you wish to shutdown?${idsCL[Default]}" + echo -en " ${idsCL[White]}(${idsCL[LightGreen]}Y${idsCL[White]})es ${idsCL[LightCyan]}/${idsCL[White]} (${idsCL[LightGreen]}*${idsCL[White]})any other key to cancel${idsCL[Default]}" + read -n 1 -p " : " choice + case "$choice" in + [Yy]) ${adm}shutdown -h now + echo -e "\n\nThe system is now shutting down..." + sleep 60 + exit 0;; + * ) MAIN_MENU;; + esac + fi } ENDISASU() { if [ "$EUID" -ne 0 ]; then sudo dpkg-reconfigure --priority=low unattended-upgrades