diff --git a/home.admin/00infoBlitz.sh b/home.admin/00infoBlitz.sh index 16ef6bbb2..19dd99e04 100755 --- a/home.admin/00infoBlitz.sh +++ b/home.admin/00infoBlitz.sh @@ -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 diff --git a/home.admin/00infoLCD.sh b/home.admin/00infoLCD.sh index 2e6338d98..70f79bcb7 100755 --- a/home.admin/00infoLCD.sh +++ b/home.admin/00infoLCD.sh @@ -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 diff --git a/home.admin/80scanLND.sh b/home.admin/80scanLND.sh index b43949e08..13049afc8 100755 --- a/home.admin/80scanLND.sh +++ b/home.admin/80scanLND.sh @@ -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