mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-11 05:13:13 +02:00
#1374 make use of internet.sh for test in v1.6
This commit is contained in:
@@ -148,7 +148,8 @@ fi
|
|||||||
|
|
||||||
# get IP address & port
|
# get IP address & port
|
||||||
networkInfo=$(${network}-cli -datadir=${bitcoin_dir} getnetworkinfo 2>/dev/null)
|
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_ip="${publicIP}"
|
||||||
public_port="$(echo ${networkInfo} | jq -r '.localaddresses [0] .port')"
|
public_port="$(echo ${networkInfo} | jq -r '.localaddresses [0] .port')"
|
||||||
if [ "${public_port}" = "null" ]; then
|
if [ "${public_port}" = "null" ]; then
|
||||||
|
@@ -83,13 +83,23 @@ while :
|
|||||||
###########################
|
###########################
|
||||||
|
|
||||||
# get the local network IP to be displayed on the lCD
|
# 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
|
# waiting for IP in general
|
||||||
if [ ${#localip} -eq 0 ]; then
|
if [ ${#localip} -eq 0 ]; then
|
||||||
l1="Waiting for Network ...\n"
|
l1="Waiting for Network ...\n"
|
||||||
l2="Not able to get local IP.\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
|
dialog --backtitle "RaspiBlitz ${codeVersion}" --infobox "$l1$l2$l3" 5 40
|
||||||
sleep 3
|
sleep 3
|
||||||
continue
|
continue
|
||||||
|
@@ -6,6 +6,7 @@ source /mnt/hdd/raspiblitz.conf
|
|||||||
|
|
||||||
# all system/service info gets detected by blitz.statusscan.sh
|
# 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/blitz.statusscan.sh)
|
||||||
|
source <(sudo /home/admin/config.scripts/internet.sh status)
|
||||||
|
|
||||||
# when admin and no other error found run LND setup check
|
# when admin and no other error found run LND setup check
|
||||||
if [ "$USER" == "admin" ] && [ ${#lndErrorFull} -eq 0 ]; then
|
if [ "$USER" == "admin" ] && [ ${#lndErrorFull} -eq 0 ]; then
|
||||||
@@ -13,7 +14,7 @@ if [ "$USER" == "admin" ] && [ ${#lndErrorFull} -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# set follow up info different for LCD and ADMIN
|
# 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
|
if [ "$USER" == "admin" ]; then
|
||||||
adminStr="Use CTRL+c to EXIT to Terminal"
|
adminStr="Use CTRL+c to EXIT to Terminal"
|
||||||
fi
|
fi
|
||||||
@@ -188,7 +189,7 @@ elif [ ${walletLocked} -gt 0 ]; then
|
|||||||
infoStr=" LND WALLET IS LOCKED !!!\n"
|
infoStr=" LND WALLET IS LOCKED !!!\n"
|
||||||
if [ "${rtlWebinterface}" = "on" ]; then
|
if [ "${rtlWebinterface}" = "on" ]; then
|
||||||
height=6
|
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
|
else
|
||||||
infoStr="${infoStr} Please use SSH to unlock:"
|
infoStr="${infoStr} Please use SSH to unlock:"
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user