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.
master
Javinator9889 2019-05-12 10:32:06 +02:00 committed by GitHub
parent ff1b57315d
commit a7bd462d74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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