Skip to content

Commit 9a77f16

Browse files
author
Daniel Hansson
authored
improve network_ok
1 parent c59609b commit 9a77f16

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,11 @@ check_command sudo -u www-data php "$NCPATH"/occ "$@";
425425

426426
network_ok() {
427427
echo "Testing if network is OK..."
428-
service network-manager restart
428+
if ! service network-manager restart > /dev/null
429+
then
430+
service networking restart > /dev/null
431+
fi
432+
sleep 2
429433
if wget -q -T 20 -t 2 http://github.com -O /dev/null & spinner_loading
430434
then
431435
return 0

0 commit comments

Comments
 (0)