File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -201,14 +201,18 @@ HC_PingGateway() {
201
201
202
202
HC_Internet () {
203
203
PrintItemHead " Internet Access"
204
-
205
- curl http://50.116.60.82 --max-time 2 > /dev/null 2>&1 # this checks fppstats.falconchristmas.com
206
- rc=$?
207
- # If first check fails, then use backup.
208
- if [ $rc -ne 0 ]; then
209
- curl http://216.40.34.37 --max-time 2 > /dev/null 2>&1 # this checks kulp.com
210
- rc=$?
211
- fi
204
+ # If one of these IP addresses are pingable then we have internet connectivity.
205
+ ips=(" 1.1.1.1" " 8.8.8.8" " 9.9.9.9" )
206
+ # Initialize return code
207
+ rc=1
208
+
209
+ # Loop through the IPs and try to ping
210
+ for ip in " ${ips[@]} " ; do
211
+ if ping -c 1 -q -W 2 " $ip " > /dev/null 2>&1 ; then
212
+ rc=0
213
+ break
214
+ fi
215
+ done
212
216
213
217
if [ $rc -eq 0 ]
214
218
then
You can’t perform that action at this time.
0 commit comments