mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 02:09:15 +01:00
fix infoscreen
This commit is contained in:
parent
c92ca69f58
commit
6211e25484
@ -157,23 +157,22 @@ fi
|
||||
# LIGHTNING NETWORK
|
||||
ln_getInfo=$(/usr/local/bin/lncli --macaroonpath=${lnd_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert getinfo)
|
||||
|
||||
ln_sync=$(echo ${ln_getInfo} | grep "synced_to_chain" | grep "true" -c)
|
||||
ln_external=$(echo ${ln_getInfo} | grep "uris" -A 2 | tr -d '\n' | cut -d '"' -f4)
|
||||
ln_sync=$(echo "${ln_getInfo}" | grep "synced_to_chain" | grep "true" -c)
|
||||
ln_external=$(echo "${ln_getInfo}" | grep "uris" -A 2 | tr -d '\n' | cut -d '"' -f4)
|
||||
|
||||
# get LND info
|
||||
/usr/local/bin/lncli --macaroonpath=${lnd_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert getinfo 2>&1 | grep "Please unlock" >/dev/null
|
||||
wallet_unlocked=$?
|
||||
if [ "$wallet_unlocked" -eq 0 ] ; then
|
||||
alias_color="${color_red}"
|
||||
ln_alias="Wallet Locked"
|
||||
else
|
||||
alias_color="${color_grey}"
|
||||
ln_alias=$(echo ${ln_getInfo} | grep "alias" | cut -d '"' -f4)
|
||||
ln_alias=$(echo ${ln_getInfo} | grep "alias" | cut -d '"' -f4)
|
||||
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
|
||||
|
||||
fi
|
||||
ln_channels_online="$(echo ${ln_getInfo} | jq -r '.num_active_channels')" 2>/dev/null
|
||||
ln_channels_online="$(echo "${ln_getInfo}" | jq -r '.num_active_channels')" 2>/dev/null
|
||||
ln_channels_total="$(/usr/local/bin/lncli --macaroonpath=${lnd_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert listchannels | jq '.[] | length')" 2>/dev/null
|
||||
ln_external_ip="$(echo $ln_external | tr ":" " " | awk '{ print $1 }' )" 2>/dev/null
|
||||
if [ "$ln_external_ip" = "$public_ip" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user