2021-05-25 17:29:57 -05:00
#!/bin/bash
# get basic system information
# these are the same set of infos the WebGUI dialog/controler has
source /home/admin/raspiblitz.info
# SETUPFILE
# this key/value file contains the state during the setup process
SETUPFILE = "/var/cache/raspiblitz/temp/raspiblitz.setup"
source ${ SETUPFILE }
############################################
# SHOW SEED WORDS AFTER SETUP
if [ " ${ setupPhase } " = = "setup" ] ; then
2021-05-25 18:11:58 -05:00
ack = 0
while [ ${ ack } -eq 0 ]
do
2021-05-25 18:13:20 -05:00
whiptail --title "IMPORTANT SEED WORDS - PLEASE WRITE DOWN" --msgbox " LND Wallet got created. Store these numbered words in a safe location:\n\n ${ seedwords6x4NEW } " 12 76
2021-05-25 18:11:58 -05:00
whiptail --title "Please Confirm" --yes-button "Show Again" --no-button "CONTINUE" --yesno " Are you sure that you wrote down the word list?" 8 55
if [ $? -eq 1 ] ; then
ack = 1
fi
done
2021-05-25 17:29:57 -05:00
fi
2021-05-25 22:10:57 -05:00
############################################
# BLOCKCHAIN INFO & OPTIONS
2021-05-26 12:06:40 -05:00
if [ ${ syncProgress } -lt 75 ] ; then
2021-05-25 22:10:57 -05:00
clear
echo " Your Blockchain is at ${ syncProgress } % - this might take multiple days to validate. "
echo "TODO: Option COPY OVER LAN IF BITCOIN"
echo "TODO: MAKE SURE THAT background.service is running from beginng!"
echo "PRESS ENTER"
read key
fi
2021-05-25 17:29:57 -05:00
############################################
# SETUP DONE CONFIRMATION (Konfetti Moment)
# when coming from fresh setup
2021-05-25 18:15:45 -05:00
if [ " ${ setupPhase } " = = "setup" ] ; then
2021-05-25 18:08:45 -05:00
clear
2021-05-25 17:29:57 -05:00
echo "Hooray :) Everything is Setup!"
echo "PRESS ENTER"
2021-05-25 18:15:00 -05:00
read key
2021-05-25 17:29:57 -05:00
2021-05-25 18:08:45 -05:00
# when coming from migration from other node
2021-05-25 17:29:57 -05:00
elif [ " ${ setupPhase } " = = "migration" ] ; then
2021-05-25 18:08:45 -05:00
clear
2021-05-25 17:29:57 -05:00
echo "Hooray :) Your Migration to RaspiBlitz is Done!"
echo "PRESS ENTER"
2021-05-25 18:15:00 -05:00
read key
2021-05-25 17:29:57 -05:00
2021-05-25 18:08:45 -05:00
# just in case then from another phase
2021-05-25 17:29:57 -05:00
else
2021-05-25 18:08:45 -05:00
clear
2021-05-25 17:29:57 -05:00
echo " Missing Final Done Dialog for: ${ setupPhase } "
echo "PRESS ENTER"
2021-05-25 18:15:00 -05:00
read key
2021-05-25 18:10:22 -05:00
fi
2021-05-26 12:06:40 -05:00
echo "Starting ..."
2021-05-25 18:21:26 -05:00
# signal to backend that all is good and it can continue
2021-05-25 18:23:11 -05:00
sudo sed -i "s/^state=.*/state='finalready'/g" /home/admin/raspiblitz.info