mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 14:51:03 +01:00
#295 fix TOR detection and line breaks
This commit is contained in:
parent
2988912084
commit
e653e41588
1 changed files with 6 additions and 3 deletions
|
@ -152,16 +152,19 @@ torInfo=""
|
|||
networkVersion=$(${network}-cli -datadir=${bitcoin_dir} -version 2>/dev/null | cut -d ' ' -f6)
|
||||
# TOR or IP
|
||||
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}" != "null" ]; then
|
||||
|
||||
if [ "${runBehindTor}" = "on" ]; then
|
||||
|
||||
# TOR address
|
||||
onionAddress=$(echo ${networkInfo} | jq -r '.localaddresses [0] .address')
|
||||
networkConnectionsInfo="${color_purple}${networkConnections} ${color_gray}peers"
|
||||
public_addr="${onionAddress}:${public_port}"
|
||||
public=""
|
||||
public_color="${color_green}"
|
||||
torInfo="+ TOR"
|
||||
|
||||
else
|
||||
|
||||
# IP address
|
||||
|
@ -286,7 +289,7 @@ ${color_yellow}${ln_publicColor}${ln_external}
|
|||
"-------------------------------------------" \
|
||||
"load average:${load##up*, }" "${temp}" \
|
||||
"${hdd}" "${sync_percentage}"
|
||||
if [ ${#onionAddress} -eq 0 ]; then
|
||||
if [ "${runBehindTor}" != "on" ]; then
|
||||
# one extra space line at the end if nodeaddress is not TOR
|
||||
echo ""
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue