Fix localIP and torAddress gathering (#3388)

* fix localIP gathering in btc-rpc-explorer.sh

* fix localIP gathering in homer.sh

* fix torAddress gathering in electrs.sh
This commit is contained in:
Leonardo Papini 2022-11-04 16:07:57 +01:00 committed by openoms
parent baa2ca485d
commit 5d61d0b216
No known key found for this signature in database
GPG Key ID: 5BFB77609B081B65
3 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,7 @@ if [ "$1" = "status" ]; then
echo "installed=${installed}"
# get network info
localIP=$(ip addr | grep 'state UP' -A2 | grep -E -v 'docker0|veth' | grep 'eth0\|wlan0\|enp0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
localIP=$(hostname -I | awk '{print $1}')
toraddress=$(sudo cat /mnt/hdd/tor/btc-rpc-explorer/hostname 2>/dev/null)
fingerprint=$(openssl x509 -in /mnt/hdd/app-data/nginx/tls.cert -fingerprint -noout | cut -d"=" -f2)

View File

@ -145,7 +145,7 @@ if [ "$1" = "menu" ]; then
# get status
echo "# collecting status info ... (please wait)"
source <(sudo /home/admin/config.scripts/bonus.electrs.sh status)
source <(sudo /home/admin/config.scripts/bonus.electrs.sh status showAddress)
if [ ${serviceInstalled} -eq 0 ]; then
echo "# FAIL not installed"

View File

@ -23,7 +23,7 @@ if [ "$1" = "menu" ]; then
source <(sudo /home/admin/config.scripts/bonus.homer.sh status)
# get network info
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
localIP=$(hostname -I | awk '{print $1}')
toraddress=$(sudo cat /mnt/hdd/tor/homer/hostname 2>/dev/null)
fingerprint=$(openssl x509 -in /mnt/hdd/app-data/nginx/tls.cert -fingerprint -noout | cut -d"=" -f2)