Final Setup Reboot

This commit is contained in:
rootzoll
2021-08-30 12:06:18 +02:00
parent 0aae081c11
commit 2691cb0a33
3 changed files with 25 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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 "