mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 10:12:06 +01:00
#470 internet testing with several ips
This commit is contained in:
parent
1932d4afa3
commit
de8fe85fc9
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user