From a6a7ab45f859a6b54652a4580dc63cb6561d7972 Mon Sep 17 00:00:00 2001 From: thomas Date: Sun, 13 Nov 2022 07:34:18 +0100 Subject: [PATCH] switch update.sh/check_online_status() from ping to curl to make it proxy ready --- update.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update.sh b/update.sh index 707b22f54..69ada6b0b 100755 --- a/update.sh +++ b/update.sh @@ -3,9 +3,9 @@ ############## Begin Function Section ############## 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') + for domain in "${CHECK_ONLINE_DOMAINS[@]}"; do + if timeout 3 curl --head --silent --output /dev/null ${domain}; then return 0 fi done