Browse Source

updated TOR info

#146
rootzoll 6 years ago
parent
commit
9b574d7c42
  1. 11
      home.admin/00infoBlitz.sh

11
home.admin/00infoBlitz.sh

@ -125,6 +125,7 @@ if [ "${public_port}" = "" ]; then
fi
fi
# CHAIN NETWORK
public_addr="??"
torInfo=""
# TOR or IP
@ -148,6 +149,15 @@ else
fi
fi
# LIGHTNING NETWORK
ln_external=$(sudo cat /mnt/hdd/tor/lnd9735/hostname 2>/dev/null)
if [ ${#ln_external} -eq 0 ]; then
ln_external=" ${public_ip}:9735"
else
torInfo="+ TOR"
fi
ln_external="${ln_external}:9735"
# 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=$?
@ -163,7 +173,6 @@ ln_alias="$(/usr/local/bin/lncli --macaroonpath=${lnd_dir}/readonly.macaroon --t
fi
ln_channels_online="$(/usr/local/bin/lncli --macaroonpath=${lnd_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert 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="$(/usr/local/bin/lncli --macaroonpath=${lnd_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert getinfo | jq -r '.uris[0]' | tr "@" " " | awk '{ print $2 }')" 2>/dev/null
ln_external_ip="$(echo $ln_external | tr ":" " " | awk '{ print $1 }' )" 2>/dev/null
if [ "$ln_external_ip" = "$public_ip" ]; then
external_color="${color_grey}"

Loading…
Cancel
Save