Browse Source

info on not started lnd

#146
rootzoll 6 years ago
parent
commit
c3ef36e445
  1. 13
      home.admin/00infoBlitz.sh

13
home.admin/00infoBlitz.sh

@ -171,10 +171,15 @@ 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 $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="${item}/${total}"
if [ ${#ln_sync} -eq 0 ]; then
ln_baseInfo="${color_red} Not started or ready"
ln_channelInfo=""
else
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep "(height" | tail -n1 | awk '{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="${item}/${total}"
fi
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

Loading…
Cancel
Save