From de8fe85fc97b3e894a7ac0f225b78b577f592aa1 Mon Sep 17 00:00:00 2001 From: Christian Rotzoll Date: Tue, 9 Apr 2019 22:44:16 +0100 Subject: [PATCH] #470 internet testing with several ips --- home.admin/00infoLCD.sh | 10 +++++++++- home.admin/80scanLND.sh | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/home.admin/00infoLCD.sh b/home.admin/00infoLCD.sh index 41a2365..b337d5c 100755 --- a/home.admin/00infoLCD.sh +++ b/home.admin/00infoLCD.sh @@ -72,8 +72,16 @@ while : if [ ${setupStep} -eq 0 ]; then # check for internet connection - # https://en.wikipedia.org/wiki/1.1.1.1 online=$(ping 1.0.0.1 -c 1 -W 2 | grep -c '1 received') + if [ ${online} -eq 0 ]; then + # re-test with other server + online=$(ping 8.8.8.8 -c 1 -W 2 | grep -c '1 received') + fi + if [ ${online} -eq 0 ]; then + # re-test with other server + online=$(ping 208.67.222.222 -c 1 -W 2 | grep -c '1 received') + fi + if [ ${online} -eq 0 ]; then message="no internet connection" diff --git a/home.admin/80scanLND.sh b/home.admin/80scanLND.sh index 7b37979..ba03905 100755 --- a/home.admin/80scanLND.sh +++ b/home.admin/80scanLND.sh @@ -35,8 +35,16 @@ if [ ${#item} -eq 0 ]; then item="?" # check if offline - # https://en.wikipedia.org/wiki/1.1.1.1 online=$(ping 1.0.0.1 -c 1 -W 2 | grep -c '1 received') + if [ ${online} -eq 0 ]; then + # re-test with other server + online=$(ping 8.8.8.8 -c 1 -W 2 | grep -c '1 received') + fi + if [ ${online} -eq 0 ]; then + # re-test with other server + online=$(ping 208.67.222.222 -c 1 -W 2 | grep -c '1 received') + fi + fi # get total number of blocks