From 0bddbd49cc790bd13ab03224a8a4639d8ea1c8af Mon Sep 17 00:00:00 2001 From: Patrick Pachur Date: Sun, 7 Oct 2018 13:57:23 +0200 Subject: [PATCH] cleanup to only have one lncli call --- home.admin/00infoBlitz.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/home.admin/00infoBlitz.sh b/home.admin/00infoBlitz.sh index 71722cd..e50c1d1 100755 --- a/home.admin/00infoBlitz.sh +++ b/home.admin/00infoBlitz.sh @@ -135,8 +135,9 @@ torInfo="" # Version networkVersion=$(${network}-cli -datadir=${bitcoin_dir} -version | cut -d ' ' -f6) # TOR or IP -onionAddress=$(${network}-cli -datadir=${bitcoin_dir} getnetworkinfo | grep '"address"' | cut -d '"' -f4) -networkConnections=$(${network}-cli -datadir=${bitcoin_dir} getnetworkinfo | jq -r '.connections') +networkInfo=$(${network}-cli -datadir=${bitcoin_dir} getnetworkinfo) +onionAddress=$(echo ${networkInfo} | jq -r '.localaddresses [0] .address') +networkConnections=$(echo ${networkInfo} | jq -r '.connections') networkConnectionsInfo="${color_purple}${networkConnections} ${color_gray}connections" if [ ${#onionAddress} -gt 0 ]; then # TOR address