test exit code of sub menus

This commit is contained in:
rootzoll
2021-05-04 18:56:39 +02:00
parent 99ab1afb24
commit 21e5c1e4dc

View File

@@ -310,10 +310,7 @@ case $CHOICE in
;; ;;
REPAIR) REPAIR)
/home/admin/98repairMenu.sh /home/admin/98repairMenu.sh
if [ $? -eq 99 ]; then # exit code 1 -> main menu to break loop and also exit with
exit 1
fi
;;
PASSWORD) PASSWORD)
sudo /home/admin/config.scripts/blitz.setpassword.sh sudo /home/admin/config.scripts/blitz.setpassword.sh
;; ;;
@@ -360,5 +357,6 @@ case $CHOICE in
exit 0 exit 0
esac esac
# go into loop - start script from beginning to load config/sate fresh echo "exit code of last submenu: $?"
/home/admin/00mainMenu.sh
# exit with not 0 to signal that main menu wants to be looped