From a7bd462d746a2772d2de19ba7bd988cc0f9e2cd4 Mon Sep 17 00:00:00 2001 From: Javinator9889 Date: Sun, 12 May 2019 10:32:06 +0200 Subject: [PATCH 1/2] Update update.sh *curl* on some systems is failing due to no URL specified (1.1.1.1) and ISP blocking *curl* needs an URL for working correctly, so sometimes it is failing as it detects **No Internet connection** but there is. In addition, at some countries some ISP did not update their routers and/or network so the Cloudflare DNS `1.1.1.1` are not working either they are blocked. I suggest using `ping` instead of `curl` with a 3 seconds timeout and pinging to Google DNS (8.8.8.8) instead of Cloudflare ones, as they are universally accepted and used. --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 7fc65578..a503d574 100755 --- a/update.sh +++ b/update.sh @@ -260,7 +260,7 @@ for option in ${CONFIG_ARRAY[@]}; do done echo -en "Checking internet connection... " -curl -o /dev/null 1.1.1.1 -sm3 +timeout 3 ping -c 1 8.8.8.8 > /dev/null if [[ $? != 0 ]]; then echo -e "\e[31mfailed\e[0m" exit 1 From e2389f48165ff9738cfe9c32d6bab1e3c0418384 Mon Sep 17 00:00:00 2001 From: Javinator9889 Date: Sun, 12 May 2019 14:40:54 +0200 Subject: [PATCH 2/2] Update update.sh Updated DNS to Quad9 --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index a503d574..67645b55 100755 --- a/update.sh +++ b/update.sh @@ -260,7 +260,7 @@ for option in ${CONFIG_ARRAY[@]}; do done echo -en "Checking internet connection... " -timeout 3 ping -c 1 8.8.8.8 > /dev/null +timeout 3 ping -c 1 9.9.9.9 > /dev/null if [[ $? != 0 ]]; then echo -e "\e[31mfailed\e[0m" exit 1