diff --git a/home.admin/00infoBlitz.sh b/home.admin/00infoBlitz.sh index e7cef29..4e5149b 100755 --- a/home.admin/00infoBlitz.sh +++ b/home.admin/00infoBlitz.sh @@ -171,8 +171,10 @@ else ln_alias=$(echo "${ln_getInfo}" | grep "alias" | cut -d '"' -f4) ln_sync=$(echo "${ln_getInfo}" | grep "synced_to_chain" | grep "true" -c) if [ ${ln_sync} -eq 0 ]; then + item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep height | tail -n1 | awk '{print $9} {print $10} {print $11} {print $12}' | tr -dc '0-9') + total=$(sudo -u bitcoin ${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq -r '.blocks') ln_baseInfo="${color_red} waiting for chain sync" - ln_channelInfo="" + ln_channelInfo="${item}/${total}" else ln_walletbalance="$(/usr/local/bin/lncli --macaroonpath=${lnd_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert walletbalance | jq -r '.confirmed_balance')" 2>/dev/null ln_channelbalance="$(/usr/local/bin/lncli --macaroonpath=${lnd_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert channelbalance | jq -r '.balance')" 2>/dev/null