slow loop LCD on LND scanning

This commit is contained in:
rootzoll
2018-08-24 01:03:01 +02:00
parent 5928eab329
commit de89983364

View File

@@ -26,6 +26,7 @@ if [ "$USER" = "pi" ]; then
fi fi
# show updating status in loop # show updating status in loop
chain=""
while : while :
do do
@@ -54,8 +55,11 @@ if [ "$USER" = "pi" ]; then
elif [ ${setupStep} -lt 100 ]; then elif [ ${setupStep} -lt 100 ]; then
# setup process init is done and not finished # setup process init is done and not finished
lndSyncing=$(sudo -u bitcoin /usr/local/bin/lncli getinfo 2>/dev/null | jq -r '.synced_to_chain' | grep -c false) if [ ${#chain} -eq 0 ];then
# get chain if not available before
chain=$(sudo -u bitcoin ${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo 2>/dev/null | jq -r '.chain') chain=$(sudo -u bitcoin ${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo 2>/dev/null | jq -r '.chain')
fi
lndSyncing=$(sudo -u bitcoin /usr/local/bin/lncli getinfo 2>/dev/null | jq -r '.synced_to_chain' | grep -c false)
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null | grep -c unlock) locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null | grep -c unlock)
if [ ${locked} -gt 0 ]; then if [ ${locked} -gt 0 ]; then
@@ -72,7 +76,7 @@ if [ "$USER" = "pi" ]; then
# special case: LND is syncing # special case: LND is syncing
/home/admin/80scanLND.sh /home/admin/80scanLND.sh
sleep 5 sleep 20
else else