Skip to content

Instantly share code, notes, and snippets.

@fellipec
Created June 26, 2023 12:20
Show Gist options
  • Save fellipec/3808af98aa47d0bed94f9ea27fed5335 to your computer and use it in GitHub Desktop.
Save fellipec/3808af98aa47d0bed94f9ea27fed5335 to your computer and use it in GitHub Desktop.
NetworkManager watchdog
#!/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