mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
fix bitcoin ip display
This commit is contained in:
parent
78bd39d3e4
commit
4c8da965a7
1 changed files with 4 additions and 1 deletions
|
@ -108,6 +108,9 @@ networkInfo=$(${network}-cli -datadir=${bitcoin_dir} getnetworkinfo 2>/dev/null)
|
|||
local_ip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
public_ip=$(curl -s http://v4.ipv6-test.com/api/myip.php)
|
||||
public_port="$(echo ${networkInfo} | jq -r '.localaddresses [0] .port')"
|
||||
if [ "${public_port}" = "null" ]; then
|
||||
public_port="8333"
|
||||
fi
|
||||
|
||||
# CHAIN NETWORK
|
||||
public_addr="??"
|
||||
|
@ -116,7 +119,7 @@ torInfo=""
|
|||
networkVersion=$(${network}-cli -datadir=${bitcoin_dir} -version 2>/dev/null | cut -d ' ' -f6)
|
||||
# TOR or IP
|
||||
onionAddress=$(echo ${networkInfo} | jq -r '.localaddresses [0] .address')
|
||||
if [ ${#onionAddress} -gt 0 ]; then
|
||||
if [ "${onionAddress}" != "null" ]; then
|
||||
# TOR address
|
||||
public_addr="${onionAddress}:${public_port}"
|
||||
public=""
|
||||
|
|
Loading…
Add table
Reference in a new issue