From 7efa541482a5c7c3d5c00221a50b19ad372ff4e2 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Wed, 5 May 2021 01:16:46 +0200 Subject: [PATCH] exit terminal and return to setup --- home.admin/00mainMenu.sh | 36 ++++++++++++++---------------------- home.admin/00raspiblitz.sh | 10 ++++++++++ home.admin/_commands.sh | 7 ------- 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/home.admin/00mainMenu.sh b/home.admin/00mainMenu.sh index 8648d0e50..15c991dee 100755 --- a/home.admin/00mainMenu.sh +++ b/home.admin/00mainMenu.sh @@ -318,43 +318,35 @@ case $CHOICE in /home/admin/99updateMenu.sh ;; REBOOT) - clear - confirmation "Are you sure?" "Reboot" "Cancel" true 7 40 - confirmationReboot=$? - if [ $confirmationReboot -eq 0 ]; then + clear + confirmation "Are you sure?" "Reboot" "Cancel" true 7 40 + confirmationReboot=$? + if [ $confirmationReboot -eq 0 ]; then clear echo "" sudo /home/admin/XXshutdown.sh reboot - exit 0 - fi + exit 1 + fi ;; OFF) - clear - confirmation "Are you sure?" "PowerOff" "Cancel" true 7 40 - confirmationShutdown=$? - if [ $confirmationShutdown -eq 0 ]; then + clear + confirmation "Are you sure?" "PowerOff" "Cancel" true 7 40 + confirmationShutdown=$? + if [ $confirmationShutdown -eq 0 ]; then clear echo "" sudo /home/admin/XXshutdown.sh - exit 0 - fi + exit 1 + fi ;; DELETE) sudo /home/admin/XXcleanHDD.sh sudo /home/admin/XXshutdown.sh reboot - exit 0 + exit 1 ;; *) clear - echo "***********************************" - echo "* RaspiBlitz Commandline" - echo "* Here be dragons .. have fun :)" - echo "***********************************" - echo "Bitcoin command line options: bitcoin-cli help" - echo "LND command line options: lncli -h" - echo "Back to main menu use command: raspiblitz" - echo - exit 0 + exit 1 esac # forward exit code of submenu to outside loop diff --git a/home.admin/00raspiblitz.sh b/home.admin/00raspiblitz.sh index 58ba6236e..10bd1e32b 100755 --- a/home.admin/00raspiblitz.sh +++ b/home.admin/00raspiblitz.sh @@ -151,6 +151,16 @@ do done echo "# mainmenu signaled exit code '${exitMenuLoop}' --> exit to terminal" +echo "***********************************" +echo "* RaspiBlitz Commandline" +echo "* Here be dragons .. have fun :)" +echo "***********************************" +if [ "${setupPhase}" == "done" ] + echo "Bitcoin command line options: bitcoin-cli help" + echo "LND command line options: lncli -h" +fi +echo "Back to menus use command: raspiblitz" +echo exit 0 ################# TODO: MOVE PARTS BELOW TO APROPIATE NEW PLACE diff --git a/home.admin/_commands.sh b/home.admin/_commands.sh index cde070212..cb1ccf744 100755 --- a/home.admin/_commands.sh +++ b/home.admin/_commands.sh @@ -23,13 +23,6 @@ function menu() { ./00mainMenu.sh } -# command: setup -# calls the setup process -function setup() { - cd /home/admin - ./setup.scripts/setupDialogControl.sh -} - # command: repair # calls directly the repair menu function repair() {