mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-19 20:24:39 +02:00
info on not started lnd
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user