loop on cancel

This commit is contained in:
rootzoll 2021-05-21 20:46:18 -05:00
parent 485abcacca
commit b8e322578c
2 changed files with 7 additions and 6 deletions

View file

@ -13,7 +13,7 @@ CHOICE=$(dialog --clear \
--backtitle "RaspiBlitz ${codeVersion} - Setup" \
--title "⚡ Welcome to your RaspiBlitz ⚡" \
--menu "\nChoose how you want to setup your RaspiBlitz: \n " \
13 64 7 \
12 64 6 \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)
clear
@ -28,6 +28,9 @@ case $CHOICE in
;;
SHUTDOWN)
# 2 --> SHUTDOWN
clear
echo "Shutting down without changes ..."
echo "Cut power when you see no status LED action anymore."
exit 2
;;
*)

View file

@ -82,7 +82,7 @@ if [ "${setupPhase}" == "setup" ]; then
# exit to terminal
if [ "${menuresult}" == "3" ]; then
exit 0
exit 1
fi
# shutdown without changes
@ -95,8 +95,7 @@ if [ "${setupPhase}" == "setup" ]; then
if [ "${menuresult}" == "1" ]; then
/home/admin/setup.scripts/dialogMigration.sh raspiblitz
if [ "$?" == "1" ]; then
echo "Upload did not worked ... doing shutdown. Restart for new try."
sudo shutdown now
# upload did not worked .. exit with 0 to restart process from outside loop
exit 0
fi
# user needs to reset password A
@ -113,8 +112,7 @@ if [ "${setupPhase}" == "setup" ]; then
echo "# Starting Blockchain & Lightning selection ..."
/home/admin/setup.scripts/dialogBlockchainLightning.sh
if [ "$?" == "1" ]; then
echo "Shutting down ... Restart for new try."
sudo shutdown now
# exit with 0 to restart process from outside loop
exit 0
fi