prevent unlocks on shutdown/reboot

This commit is contained in:
rootzoll 2021-09-05 17:04:26 +02:00
parent 9eb8b8c160
commit c55c69dcbe
2 changed files with 8 additions and 5 deletions

View File

@ -652,16 +652,12 @@ if [ ${isMounted} -eq 0 ]; then
# delete setup data from RAM
sudo rm ${setupFile}
# signal that setup phas is over
# signal that setup phase 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}
sudo cp /home/admin/raspiblitz.log /home/admin/raspiblitz.log.setup
/home/admin/config.scripts/blitz.shutdown.sh reboot finalsetup
sleep 100

View File

@ -26,6 +26,13 @@ if [ "${action}" == "chain-unlock" ]; then
CHAIN=$2
fi
# dont if state is on reboot or shutdown
if [ "${state}" == "reboot" ] || [ "${state}" == "shutdown" ]; then
echo "# ignore unlock - because system is in shutdown/reboot state"
sleep 1
exit 0
fi
source <(/home/admin/config.scripts/network.aliases.sh getvars lnd ${chain}net)
# check if wallet is already unlocked