Browse Source

scan action detail

dev
rootzoll 6 years ago
parent
commit
a1fdafde5a
  1. 7
      home.admin/80scanLND.sh

7
home.admin/80scanLND.sh

@ -12,15 +12,18 @@ chain="$(echo "${blockchaininfo}" | jq -r '.chain')"
# 1) First try the "Rescanned through block" - it seems to happen if it restarts # 1) First try the "Rescanned through block" - it seems to happen if it restarts
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep "Rescanned through block" | tail -n1 | cut -d ']' -f2 | cut -d '(' -f2 | tr -dc '0-9') item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep "Rescanned through block" | tail -n1 | cut -d ']' -f2 | cut -d '(' -f2 | tr -dc '0-9')
action="Rescanning"
# 2) Second try the "Caught up to height" - thats the usual on first scan start # 2) Second try the "Caught up to height" - thats the usual on first scan start
if [ ${#item} -eq 0 ]; then if [ ${#item} -eq 0 ]; then
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep "Caught up to height" | tail -n1 | cut -d ']' -f2 | tr -dc '0-9') item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep "Caught up to height" | tail -n1 | cut -d ']' -f2 | tr -dc '0-9')
action="Catching-Up"
fi fi
# 3) Third try the "LNWL: Filtering block" - thats the usual on later starts # 3) Third try the "LNWL: Filtering block" - thats the usual on later starts
if [ ${#item} -eq 0 ]; then if [ ${#item} -eq 0 ]; then
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep "LNWL: Filtering block" | tail -n1 | cut -d ' ' -f7 | tr -dc '0-9') item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep "LNWL: Filtering block" | tail -n1 | cut -d ' ' -f7 | tr -dc '0-9')
action="Filtering"
fi fi
# if no progress info # if no progress info
@ -55,11 +58,11 @@ if [ ${isInitialChainSync} -gt 0 ]; then
fi fi
else else
heigh=7 heigh=7
infoStr=$(echo " Lightning Rescanning Blockchain\n Progress: ${scanstate}\n Please wait - this can take some time\n ssh admin@${localip}\n Password A") infoStr=$(echo " Lightning ${action} Blockchain\n Progress: ${scanstate}\n Please wait - this can take some time\n ssh admin@${localip}\n Password A")
if [ "$USER" = "admin" ]; then if [ "$USER" = "admin" ]; then
heigh=6 heigh=6
width=53 width=53
infoStr=$(echo " Lightning Rescanning Blockchain\n Progress: ${scanstate}\n Please wait - this can take some long time.\n Its OK to close terminal and ssh back in later.") infoStr=$(echo " Lightning ${action} Blockchain\n Progress: ${scanstate}\n Please wait - this can take some long time.\n Its OK to close terminal and ssh back in later.")
fi fi
fi fi

Loading…
Cancel
Save