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,6 +243,21 @@ DRYRUN2() {
ENTER2CONTINUE ENTER2CONTINUE
} }
GO_REBOOT() { GO_REBOOT() {
[ "$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 read -n 1 -p "Are you sure you wish to reboot (y/N)?" choice
case "$choice" in case "$choice" in
[Yy]) if [ "$EUID" -ne 0 ]; then sudo shutdown -r now [Yy]) if [ "$EUID" -ne 0 ]; then sudo shutdown -r now
@@ -253,6 +268,7 @@ GO_REBOOT() {
exit 0;; exit 0;;
* ) MAIN_MENU;; * ) MAIN_MENU;;
esac 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