@ -18,6 +18,9 @@ if [ "$USER" = "pi" ]; then
while :
while :
do
do
# refresh network
network = ` sudo cat /home/admin/.network`
# get the setup state
# get the setup state
setupStepExists = $( sudo -u admin ls -la /home/admin/.setup | grep -c .setup)
setupStepExists = $( sudo -u admin ls -la /home/admin/.setup | grep -c .setup)
if [ ${ setupStepExists } -eq 1 ] ; then
if [ ${ setupStepExists } -eq 1 ] ; then
@ -40,7 +43,7 @@ if [ "$USER" = "pi" ]; then
# setup process init is done and not finished
# setup process init is done and not finished
lndSyncing = $( sudo -u bitcoin lncli getinfo | jq -r '.synced_to_chain' | grep -c false )
lndSyncing = $( sudo -u bitcoin lncli getinfo | jq -r '.synced_to_chain' | grep -c false )
chain = $( sudo -u bitcoin ${ network } -cli getblockchaininfo | jq -r '.chain' )
chain = $( sudo -u bitcoin ${ network } -cli -datadir= /home/bitcoin/.${ network } getblockchaininfo | jq -r '.chain' )
locked = $( sudo tail -n 1 /mnt/hdd/lnd/logs/${ network } /${ chain } net/lnd.log | grep -c unlock)
locked = $( sudo tail -n 1 /mnt/hdd/lnd/logs/${ network } /${ chain } net/lnd.log | grep -c unlock)
if [ ${ locked } -gt 0 ] ; then
if [ ${ locked } -gt 0 ] ; then
@ -75,14 +78,15 @@ if [ "$USER" = "pi" ]; then
# RaspiBlitz is full Setup
# RaspiBlitz is full Setup
chain = $( su -u bitcoin ${ network } -cli getblockchaininfo | jq -r '.chain' )
chain = $( sudo -u bitcoin ${ network } -cli -datadir= /home/bitcoin/.${ network } getblockchaininfo | jq -r '.chain' )
locked = $( sudo tail -n 1 /mnt/hdd/lnd/logs/${ network } /${ chain } net/lnd.log | grep -c unlock)
locked = $( sudo tail -n 1 /mnt/hdd/lnd/logs/${ network } /${ chain } net/lnd.log | grep -c unlock)
if [ ${ locked } -gt 0 ] ; then
if [ ${ locked } -gt 0 ] ; then
# special case: LND wallet is locked ---> show unlock info
# special case: LND wallet is locked ---> show unlock info
l1 = "!!! LND WALLET IS LOCKED !!!\n"
l1 = "!!! LND WALLET IS LOCKED !!!\n"
l2 = " Login: ssh admin@ ${ localip } \n "
l2 = " Login: ssh admin@ ${ localip } \n "
l3 = "Use your Password A\n"
l3 = "Use your Password A\n"
boxwidth = $(( ${# localip } + 20 ))
boxwidth = $(( ${# localip } + 22 ))
dialog --backtitle "RaspiBlitz - Welcome" --infobox " $l1 $l2 $l3 " 5 ${ boxwidth }
dialog --backtitle "RaspiBlitz - Welcome" --infobox " $l1 $l2 $l3 " 5 ${ boxwidth }
sleep 5
sleep 5