#1374 make use of internet.sh for test in v1.6

This commit is contained in:
rootzoll 2020-07-23 15:21:10 +02:00
parent 1ff8ffc2cf
commit cc1cda0563
3 changed files with 17 additions and 5 deletions

View file

@ -148,7 +148,8 @@ fi
# get IP address & port
networkInfo=$(${network}-cli -datadir=${bitcoin_dir} getnetworkinfo 2>/dev/null)
local_ip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
source <(sudo /home/admin/config.scripts/internet.sh status)
local_ip="${localip}"
public_ip="${publicIP}"
public_port="$(echo ${networkInfo} | jq -r '.localaddresses [0] .port')"
if [ "${public_port}" = "null" ]; then

View file

@ -83,13 +83,23 @@ while :
###########################
# get the local network IP to be displayed on the lCD
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
source <(sudo /home/admin/config.scripts/internet.sh status)
# waiting for IP in general
if [ ${#localip} -eq 0 ]; then
l1="Waiting for Network ...\n"
l2="Not able to get local IP.\n"
l3="Is LAN cable connected?\n"
l3="LAN cable connected? WIFI lost?\n"
dialog --backtitle "RaspiBlitz ${codeVersion}" --infobox "$l1$l2$l3" 5 40
sleep 3
continue
fi
# waiting for Internet connection
if [ ${online} -eq 0 ]; then
l1="Waiting for Internet ...\n"
l2="Local Network seems OK but no Internet.\n"
l3="Is router still online?\n"
dialog --backtitle "RaspiBlitz ${codeVersion}" --infobox "$l1$l2$l3" 5 40
sleep 3
continue

View file

@ -6,6 +6,7 @@ source /mnt/hdd/raspiblitz.conf
# all system/service info gets detected by blitz.statusscan.sh
source <(sudo /home/admin/config.scripts/blitz.statusscan.sh)
source <(sudo /home/admin/config.scripts/internet.sh status)
# when admin and no other error found run LND setup check
if [ "$USER" == "admin" ] && [ ${#lndErrorFull} -eq 0 ]; then
@ -13,7 +14,7 @@ if [ "$USER" == "admin" ] && [ ${#lndErrorFull} -eq 0 ]; then
fi
# set follow up info different for LCD and ADMIN
adminStr="ssh admin@${localIP} ->Password A"
adminStr="ssh admin@${localip} ->Password A"
if [ "$USER" == "admin" ]; then
adminStr="Use CTRL+c to EXIT to Terminal"
fi
@ -188,7 +189,7 @@ elif [ ${walletLocked} -gt 0 ]; then
infoStr=" LND WALLET IS LOCKED !!!\n"
if [ "${rtlWebinterface}" = "on" ]; then
height=6
infoStr="${infoStr} Browser: http://${localIP}:3000\n PasswordB=login / PasswordC=unlock"
infoStr="${infoStr} Browser: http://${localip}:3000\n PasswordB=login / PasswordC=unlock"
else
infoStr="${infoStr} Please use SSH to unlock:"
fi