Explorar o código

Merge pull request #4859 from mitch-geht-ab/updatesh-proxy-caplty

switch update.sh/check_online_status() from ping to curl to make it proxy compatible
Niklas Meyer %!s(int64=2) %!d(string=hai) anos
pai
achega
ff4f2ae0b6
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      update.sh

+ 3 - 3
update.sh

@@ -3,9 +3,9 @@
 ############## Begin Function Section ##############
 ############## Begin Function Section ##############
 
 
 check_online_status() {
 check_online_status() {
-  CHECK_ONLINE_IPS=(1.1.1.1 9.9.9.9 8.8.8.8)
-  for ip in "${CHECK_ONLINE_IPS[@]}"; do
-    if timeout 3 ping -c 1 ${ip} > /dev/null; then
+  CHECK_ONLINE_DOMAINS=('https://github.com' 'https://hub.docker.com')
+  for domain in "${CHECK_ONLINE_DOMAINS[@]}"; do
+    if timeout 3 curl --head --silent --output /dev/null ${domain}; then
       return 0
       return 0
     fi
     fi
   done
   done