save 30 seconds on the second try

+ add which sites it tests against
This commit is contained in:
Daniel Hansson 2020-09-17 12:03:47 +02:00 коммит произвёл GitHub
Родитель 910dc71045
Коммит a0407e6902
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 9 добавлений и 4 удалений

13
lib.sh
Просмотреть файл

@ -354,7 +354,7 @@ print_text_in_color "$ICyan" "Checking connection..."
then then
return 0 return 0
else else
print_text_in_color "$IRed" "curl didn't produce a 200 status, is the site reachable?" print_text_in_color "$IRed" "curl didn't produce a 200 status, is "${1}" reachable?"
return 1 return 1
fi fi
} }
@ -878,9 +878,14 @@ then
countdown 'Waiting for network to restart...' 3 countdown 'Waiting for network to restart...' 3
if ! site_200 github.com if ! site_200 github.com
then then
# sleep 40 seconds so that some slow networks have time to restart # sleep 10 seconds so that some slow networks have time to restart
countdown 'Not online yet, waiting a bit more...' 40 countdown 'Not online yet, waiting a bit more...' 10
site_200 github.com if ! site_200 github.com
then
# sleep 30 seconds so that some REALLY slow networks have time to restart
countdown 'Not online yet, waiting a bit more (last try)...' 30
site_200 github.com
fi
fi fi
else else
msg_box "Your current Ubuntu version is $DISTRO but must be between 18.04 - 20.04.6 to run this script." msg_box "Your current Ubuntu version is $DISTRO but must be between 18.04 - 20.04.6 to run this script."