This commit is contained in:
2025-08-17 17:30:44 -05:00
parent ee2a006bcb
commit 78ade52419
2 changed files with 27 additions and 11 deletions

View File

@@ -2,7 +2,7 @@
action="$1" action="$1"
FOLDER='/opt/idssys/linupx' FOLDER='/opt/idssys/linupx'
VERS='6.60.39-06142025' VERS='6.60.42-08172025'
IPERFVER="3.15" IPERFVER="3.15"

View File

@@ -243,16 +243,32 @@ DRYRUN2() {
ENTER2CONTINUE ENTER2CONTINUE
} }
GO_REBOOT() { GO_REBOOT() {
read -n 1 -p "Are you sure you wish to reboot (y/N)?" choice [ "$EUID" -ne 0 ] && adm="SUDO " || adm=""
case "$choice" in if [ -f /opt/idssys/nodemgmt/.tmp/.skip ]; then
[Yy]) if [ "$EUID" -ne 0 ]; then sudo shutdown -r now read -n 1 -p "NodeMgmt Skip is currently enabled, should we disable that and reboot or just reboot (y/r)?" choice
else shutdown -r now case "$choice" in
fi [Yy]) ${adm}/usr/local/bin/nmg skip reboot
echo 'The system is now rebooting...' echo 'The system is now rebooting...'
sleep 60 sleep 60
exit 0;; exit 0;;
* ) MAIN_MENU;; [Rr]) ${adm}shutdown -r now
esac echo 'The system is now rebooting...'
sleep 60
exit 0;;
* ) MAIN_MENU;;
esac
else
read -n 1 -p "Are you sure you wish to reboot (y/N)?" choice
case "$choice" in
[Yy]) if [ "$EUID" -ne 0 ]; then sudo shutdown -r now
else shutdown -r now
fi
echo 'The system is now rebooting...'
sleep 60
exit 0;;
* ) MAIN_MENU;;
esac
fi
} }
SHUTDOWN() { SHUTDOWN() {
read -n 1 -p "Are you sure you wish to shutdown (y/N)?" choice read -n 1 -p "Are you sure you wish to shutdown (y/N)?" choice