Browse Source

better info during scanning

#146
rootzoll 6 years ago
parent
commit
65591d6aae
  1. 4
      home.admin/70initLND.sh
  2. 10
      home.admin/80scanLND.sh

4
home.admin/70initLND.sh

@ -201,7 +201,7 @@ fi
echo ""
echo "*** Check LND Sync ***"
item=0
lndSyncing=$(sudo -u bitcoin /usr/local/bin/lncli getinfo | jq -r '.synced_to_chain' | grep -c true)
lndSyncing=$(sudo -u bitcoin /usr/local/bin/lncli getinfo 2>/dev/null | jq -r '.synced_to_chain' | grep -c true)
if [ ${lndSyncing} -eq 0 ]; then
echo "OK - wait for LND to be synced"
while :
@ -212,7 +212,7 @@ if [ ${lndSyncing} -eq 0 ]; then
sleep 3
# break loop when synced
lndSyncing=$(sudo -u bitcoin /usr/local/bin/lncli getinfo | jq -r '.synced_to_chain' | grep -c true)
lndSyncing=$(sudo -u bitcoin /usr/local/bin/lncli getinfo 2>/dev/null | jq -r '.synced_to_chain' | grep -c true)
if [ ${lndSyncing} -eq 1 ]; then
break
fi

10
home.admin/80scanLND.sh

@ -1,6 +1,9 @@
# load network
network=`sudo cat /home/admin/.network`
# load name of Blitz
name=`sudo cat /home/admin/.hostname`
### USER PI AUTOSTART (LCD Display)
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
@ -22,7 +25,10 @@ if [ ${percent} -eq 100 ]; then
percent=0
fi
infoStr=$(echo " Lightning Rescanning Blockchain ${percent}%\nplease wait - this can take some time")
infoStr=$(echo " Lightning Rescanning Blockchain ${percent}%\nplease wait - this can take some time\nssh admin@${localip}\nPassword A")
if [ "$USER" = "admin" ]; then
infoStr=$(echo " Lightning Rescanning Blockchain ${percent}%\nplease wait - this can take some time\nIts OK to close terminal and ssh back in later.")
fi
# check if blockchain is still syncing
isWaitingBlockchain=$( sudo -u bitcoin tail -n 2 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep "Waiting for chain backend to finish sync" -c )
@ -32,4 +38,4 @@ fi
# display progress to user
sleep 1
dialog --backtitle "RaspiBlitz (${localip} / ${network} / ${chain})" --infobox "${infoStr}" 4 42
dialog --title "${name}" --backtitle "RaspiBlitz (${localip} / ${network} / ${chain})" --infobox "${infoStr}" 4 42
Loading…
Cancel
Save