Last active
August 29, 2015 14:28
-
-
Save mustafa01ali/66a73777ed92bbf02861 to your computer and use it in GitHub Desktop.
Simple bash script to detect network outage and troll network admins
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
#!/bin/bash | |
while true | |
do | |
ping -c 1 www.example.com &> /dev/null | |
if [ $? -ne 0 ]; then | |
echo `date`: ping failed! | |
say "Hey network admin - internet is down" -v bruce | |
fi | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment