Skip to content

Instantly share code, notes, and snippets.

@recyclerobot
Last active August 29, 2015 13:57
Show Gist options
  • Save recyclerobot/9770207 to your computer and use it in GitHub Desktop.
Save recyclerobot/9770207 to your computer and use it in GitHub Desktop.
auto reboot on network fail
ping -c4 192.168.1.1 > /dev/null
if [ $? != 0 ]
then
sudo /sbin/shutdown -r now
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment