diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index ef2312daf..3c8b12cc7 100755 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -645,12 +645,17 @@ if [ ${isMounted} -eq 0 ]; then # signal that setup phas is over sed -i "s/^setupPhase=.*/setupPhase='done'/g" ${infoFile} + + ######################################## + # AFTER SETUP REBOOT + # touchscreen activation, start with configured SWAP, fix LCD text bug + # if touchscreen is on (on recover/update) --> reboot now to activate touchscreen source ${configFile} - if [ "${touchscreen}" == "1" ] || [ "${touchscreen}" == "on" ]; then - sudo cp ${/home/admin/raspiblitz.log} ${/home/admin/raspiblitz.log}.setup - /home/admin/config.scripts/blitz.shutdown.sh reboot - fi + sudo cp $/home/admin/raspiblitz.log $/home/admin/raspiblitz.log.setup + /home/admin/config.scripts/blitz.shutdown.sh reboot finalsetup + sleep 100 + exit 0 else diff --git a/home.admin/config.scripts/blitz.shutdown.sh b/home.admin/config.scripts/blitz.shutdown.sh index e13762352..9f6350a1e 100755 --- a/home.admin/config.scripts/blitz.shutdown.sh +++ b/home.admin/config.scripts/blitz.shutdown.sh @@ -22,7 +22,7 @@ if [ "$1" = "reboot" ]; then shutdownParams="-h -r now" echo "It will then reboot again automatically." sed -i "s/^state=.*/state=reboot/g" ${infoFile} - sed -i "s/^message=.*/message=''/g" ${infoFile} + sed -i "s/^message=.*/message='$2'/g" ${infoFile} else shutdownParams="-h now" echo "Then wait 5 seconds and disconnect power." @@ -37,19 +37,24 @@ echo "-----------------------------------------------" echo "stop electrs - please wait .." sudo systemctl stop electrs 2>/dev/null -# stopping lnd +# stopping lightning echo "stop lightning - please wait .." sudo systemctl stop lnd 2>/dev/null sudo systemctl stop lightningd 2>/dev/null +sudo systemctl stop tlnd 2>/dev/null +sudo systemctl stop tlightningd 2>/dev/null +sudo systemctl stop slnd 2>/dev/null +sudo systemctl stop slightningd 2>/dev/null # stopping bitcoin (thru cli) echo "stop ${network}d (1) - please wait .." -sudo -u bitcoin ${network}-cli stop 2>/dev/null -sleep 10 +timeout 10 sudo -u bitcoin ${network}-cli stop 2>/dev/null # stopping bitcoind (thru systemd) echo "stop ${network}d (2) - please wait .." sudo systemctl stop ${network}d 2>/dev/null +sudo systemctl stop t${network}d 2>/dev/null +sudo systemctl stop s${network}d 2>/dev/null sleep 3 # make sure drives are synced before shutdown @@ -62,4 +67,4 @@ sync echo "starting shutdown ..." sudo shutdown ${shutdownParams} -exit 0 +exit 0 \ No newline at end of file diff --git a/home.admin/setup.scripts/eventInfoWait.sh b/home.admin/setup.scripts/eventInfoWait.sh index cfa284828..aa86b8e0b 100644 --- a/home.admin/setup.scripts/eventInfoWait.sh +++ b/home.admin/setup.scripts/eventInfoWait.sh @@ -52,6 +52,12 @@ Preparing Blockchain Sync Please wait ... " 6 30 +elif [ "${eventID}" == "reboot" ] && [ "${contentString}" == "finalsetup" ]; then + + dialog --backtitle "${backtitle}" --cr-wrap --infobox " +Final Setup Reboot +" 5 23 + elif [ "${eventID}" == "reboot" ]; then dialog --backtitle "${backtitle}" --cr-wrap --infobox "