Last active
August 29, 2015 14:09
-
-
Save Illizian/1a49677d5e0cc989bf7d to your computer and use it in GitHub Desktop.
connectivity.sh
This file contains 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
# m h dom mon dow command | |
*/1 * * * * /home/alex/connectivity.sh |
This file contains 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
wget --spider http://google.com | |
if [ "$?" != 0 ]; then | |
play ~/sadtrombone.wav | |
espeak "The internet is down" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check internet connectivity and play sad trombone (http://soundbible.com/1830-Sad-Trombone.html) if no connection is present.