From 9a77f1611c767ebd419ea52801b8b0ba152d89db Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Sat, 9 Jun 2018 15:00:26 +0200 Subject: [PATCH] improve network_ok --- lib.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib.sh b/lib.sh index 7550cf10..31002a8d 100644 --- a/lib.sh +++ b/lib.sh @@ -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