Skip to content

Instantly share code, notes, and snippets.

@mustafa01ali
Last active August 29, 2015 14:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustafa01ali/66a73777ed92bbf02861 to your computer and use it in GitHub Desktop.
Save mustafa01ali/66a73777ed92bbf02861 to your computer and use it in GitHub Desktop.
Simple bash script to detect network outage and troll network admins
#!/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