mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
improve test_connection (#548)
This commit is contained in:
parent
31c58e24f3
commit
33d97ff4f5
20
lib.sh
20
lib.sh
@ -207,19 +207,27 @@ ip link set "$IFACE" down
|
||||
wait
|
||||
ip link set "$IFACE" up
|
||||
wait
|
||||
check_command service network-manager restart
|
||||
echo "Checking connection..."
|
||||
sleep 3
|
||||
if ! nslookup github.com
|
||||
check_command service network-manager restart
|
||||
sleep 2
|
||||
if nslookup github.com
|
||||
then
|
||||
echo "Online!"
|
||||
elif ! nslookup github.com
|
||||
then
|
||||
echo "Trying to restart networking service..."
|
||||
check_command service networking restart
|
||||
fi
|
||||
if ! nslookup github.com
|
||||
then
|
||||
if nslookup github.com
|
||||
then
|
||||
echo "Online!"
|
||||
fi
|
||||
else
|
||||
if ! nslookup github.com
|
||||
then
|
||||
msg_box "Network NOT OK. You must have a working network connection to run this script
|
||||
If you think that this is a bug, please report it to https://github.com/nextcloud/vm/issues."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user