bashrc, reconnect, add a reboot of the wifi if rebooting Mullvad doesn't work.

This commit is contained in:
2026-08-04 09:35:33 -07:00
parent bf57faaac5
commit 73dfdce734
+23 -1
View File
@@ -1122,6 +1122,9 @@
test_domain="git.hyperling.com" test_domain="git.hyperling.com"
test_connection() { test_connection() {
ping -c 3 $test_domain ping -c 3 $test_domain
status="$?"
echo "* Status Returned: '$status'"
return $?
} }
test_connection && test_connection &&
echo -e "\n* Looks good! Not trying anything." && echo -e "\n* Looks good! Not trying anything." &&
@@ -1147,7 +1150,26 @@
show_connection show_connection
echo -e "\n* Testing Again..." 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_wifi="reconnect"
alias test_network="reconnect" alias test_network="reconnect"