Created
June 26, 2023 12:20
-
-
Save fellipec/3808af98aa47d0bed94f9ea27fed5335 to your computer and use it in GitHub Desktop.
NetworkManager watchdog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ping -c 1 1.1.1.1 | |
received=$? | |
echo $received | |
if [[ $received -ne 0 ]] ; then | |
service NetworkManager restart | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment