diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 058331c..7b05668 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -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"