bashrc, reconnect, add a reboot of the wifi if rebooting Mullvad doesn't work.
This commit is contained in:
@@ -1122,6 +1122,9 @@
|
||||
test_domain="git.hyperling.com"
|
||||
test_connection() {
|
||||
ping -c 3 $test_domain
|
||||
status="$?"
|
||||
echo "* Status Returned: '$status'"
|
||||
return $?
|
||||
}
|
||||
test_connection &&
|
||||
echo -e "\n* Looks good! Not trying anything." &&
|
||||
@@ -1147,7 +1150,26 @@
|
||||
show_connection
|
||||
|
||||
echo -e "\n* Testing Again..."
|
||||
test_connection
|
||||
test_connection &&
|
||||
echo -e "\n* Looks good! Not trying anything else." &&
|
||||
return 0 ||
|
||||
echo -e "\n* Connection failed, troubleshooting more..."
|
||||
|
||||
reset_wifi() {
|
||||
wifi off
|
||||
sleep 5
|
||||
wifi on
|
||||
sleep 5
|
||||
}
|
||||
echo -e "\n* Turning WiFi Off & On Again"
|
||||
reset_wifi
|
||||
echo "Done!"
|
||||
|
||||
echo -e "\n* Testing Again..."
|
||||
test_connection &&
|
||||
echo -e "\n* Looks good now!" &&
|
||||
return 0 ||
|
||||
echo -e "\n* Connection still failed, maybe try rebooting?"
|
||||
}
|
||||
alias test_wifi="reconnect"
|
||||
alias test_network="reconnect"
|
||||
|
||||
Reference in New Issue
Block a user