From ac76b585edb8afeb3ce47b4ee9d50aab85ec2180 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Fri, 7 Aug 2020 00:57:28 +0200 Subject: [PATCH] make the connection check an if argument --- lib.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib.sh b/lib.sh index 787b4f4b..949afc6e 100644 --- a/lib.sh +++ b/lib.sh @@ -765,8 +765,14 @@ else then systemctl restart systemd-networkd > /dev/null fi - # sleep needs to be 30 for some slow networks to restart - countdown 'Waiting for network to restart...' 30 && site_200 github.com + # Check the connention + countdown 'Waiting for network to restart...' 3 + if ! site_200 github.com + then + # sleep 40 seconds so that some slow networks have time to restart + countdown 'Not online yet, waiting a bit more...' 40 + site_200 github.com + fi fi }