make the connection check an if argument

This commit is contained in:
Daniel Hansson 2020-08-07 00:57:28 +02:00 committed by GitHub
parent c1b6330991
commit ac76b585ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

10
lib.sh
View File

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