improve network_ok

This commit is contained in:
Daniel Hansson 2018-06-09 15:00:26 +02:00 committed by GitHub
parent c59609b09d
commit 9a77f1611c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
lib.sh
View File

@ -425,7 +425,11 @@ check_command sudo -u www-data php "$NCPATH"/occ "$@";
network_ok() {
echo "Testing if network is OK..."
service network-manager restart
if ! service network-manager restart > /dev/null
then
service networking restart > /dev/null
fi
sleep 2
if wget -q -T 20 -t 2 http://github.com -O /dev/null & spinner_loading
then
return 0