From 2e7745cee9fdfa27c790c13ff0316f9f79e90500 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Wed, 11 Dec 2019 14:03:52 +0100 Subject: [PATCH] replacing direct reboot with script --- home.admin/00mainMenu.sh | 7 +++---- home.admin/00raspiblitz.sh | 2 +- home.admin/00settingsMenuServices.sh | 2 +- home.admin/20recoverDialog.sh | 2 +- home.admin/50torrentHDD.sh | 2 +- home.admin/70initLND.sh | 2 +- home.admin/95finalSetup.sh | 2 +- home.admin/98repairBlockchain.sh | 2 +- home.admin/config.scripts/network.reindex.sh | 2 +- 9 files changed, 11 insertions(+), 12 deletions(-) diff --git a/home.admin/00mainMenu.sh b/home.admin/00mainMenu.sh index 905a3529..8fa0bea8 100755 --- a/home.admin/00mainMenu.sh +++ b/home.admin/00mainMenu.sh @@ -188,7 +188,7 @@ case $CHOICE in sudo -u bitcoin ${network}-cli stop echo "Press ENTER to Reboot." read key - sudo shutdown -r now + sudo /home/admin/XXshutdown.sh reboot else ./00mainMenu.sh fi @@ -201,10 +201,9 @@ case $CHOICE in sudo /home/admin/config.scripts/blitz.setpassword.sh noreboot=$? if [ "${noreboot}" = "0" ]; then - sudo -u bitcoin ${network}-cli stop echo "Press ENTER to Reboot .." read key - sudo shutdown -r now + sudo /home/admin/XXshutdown.sh reboot else echo "Press ENTER to return to main menu .." read key @@ -231,7 +230,7 @@ case $CHOICE in ;; DELETE) sudo ./XXcleanHDD.sh - sudo shutdown -r now + sudo /home/admin/XXshutdown.sh reboot exit 0 ;; UPDATE) diff --git a/home.admin/00raspiblitz.sh b/home.admin/00raspiblitz.sh index 6c09f10a..1e58fd2f 100755 --- a/home.admin/00raspiblitz.sh +++ b/home.admin/00raspiblitz.sh @@ -418,7 +418,7 @@ case $CHOICE in ;; DELETE) sudo /home/admin/XXcleanHDD.sh - sudo shutdown -r now + sudo /home/admin/XXshutdown.sh reboot exit 0 ;; X) diff --git a/home.admin/00settingsMenuServices.sh b/home.admin/00settingsMenuServices.sh index 64d71ab9..be6fd98b 100644 --- a/home.admin/00settingsMenuServices.sh +++ b/home.admin/00settingsMenuServices.sh @@ -508,5 +508,5 @@ if [ ${needsReboot} -eq 1 ]; then # stop bitcoind sudo -u bitcoin ${network}-cli stop sleep 4 - sudo shutdown -r now + sudo /home/admin/XXshutdown.sh reboot fi diff --git a/home.admin/20recoverDialog.sh b/home.admin/20recoverDialog.sh index b7c80e87..add27e29 100755 --- a/home.admin/20recoverDialog.sh +++ b/home.admin/20recoverDialog.sh @@ -54,4 +54,4 @@ else dialog --backtitle "RaspiBlitz" --msgbox "OK - SSH password A set.\nFINAL REBOOT IS NEEDED." 6 52 fi -sudo shutdown -r now \ No newline at end of file +sudo /home/admin/XXshutdown.sh reboot \ No newline at end of file diff --git a/home.admin/50torrentHDD.sh b/home.admin/50torrentHDD.sh index 8c9f6fb3..946d0bb1 100755 --- a/home.admin/50torrentHDD.sh +++ b/home.admin/50torrentHDD.sh @@ -296,7 +296,7 @@ if [ "${setupStep}" = "100" ]; then sudo chown -R bitcoin:bitcoin /mnt/hdd/${network}/ sudo systemctl enable ${network}d echo "DONE - rebooting: sudo shutdown -r now" - sudo shutdown -r now + sudo /home/admin/XXshutdown.sh reboot else # set SetupState sudo sed -i "s/^setupStep=.*/setupStep=50/g" /home/admin/raspiblitz.info diff --git a/home.admin/70initLND.sh b/home.admin/70initLND.sh index b758c22c..0a791372 100755 --- a/home.admin/70initLND.sh +++ b/home.admin/70initLND.sh @@ -495,6 +495,6 @@ System will restart now. echo "Setting the Name/Alias/Hostname .." sudo /home/admin/config.scripts/lnd.setname.sh ${hostname} - sudo shutdown -r now + sudo /home/admin/XXshutdown.sh reboot fi diff --git a/home.admin/95finalSetup.sh b/home.admin/95finalSetup.sh index 516d07d6..b94896e2 100755 --- a/home.admin/95finalSetup.sh +++ b/home.admin/95finalSetup.sh @@ -38,4 +38,4 @@ echo "Setup done. Rebooting now." sudo -u bitcoin ${network}-cli stop sleep 3 -sudo shutdown -r now \ No newline at end of file +sudo /home/admin/XXshutdown.sh reboot \ No newline at end of file diff --git a/home.admin/98repairBlockchain.sh b/home.admin/98repairBlockchain.sh index 3d17256a..4344728c 100755 --- a/home.admin/98repairBlockchain.sh +++ b/home.admin/98repairBlockchain.sh @@ -33,7 +33,7 @@ elif [ "${CHOICE}" = "RESYNC" ]; then dialog --pause "OK. System will reboot to activate changes." 8 58 8 clear echo "rebooting .. (please wait)" - sudo shutdown -r now + sudo /home/admin/XXshutdown.sh reboot elif [ "${CHOICE}" = "REINDEX" ]; then echo "Starting REINDEX ..." diff --git a/home.admin/config.scripts/network.reindex.sh b/home.admin/config.scripts/network.reindex.sh index 3a159181..6d0173ab 100755 --- a/home.admin/config.scripts/network.reindex.sh +++ b/home.admin/config.scripts/network.reindex.sh @@ -100,4 +100,4 @@ sleep 4 # clean logs (to prevent a false reindex detection) sudo rm /mnt/hdd/${network}/debug.log 2>/dev/null # reboot -sudo shutdown -r now \ No newline at end of file +sudo /home/admin/XXshutdown.sh reboot \ No newline at end of file