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"
FOLDER='/opt/idssys/linupx'
VERS='6.60.39-06142025'
VERS='6.60.42-08172025'
IPERFVER="3.15"

View File

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