Created
September 26, 2011 10:26
-
-
Save jonleung/1241985 to your computer and use it in GitHub Desktop.
HerokuPoke
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
count_sheep () { | |
COUNTER=100 | |
while [ $COUNTER -gt 0 ]; do | |
echo $COUNTER | |
sleep 1 | |
let COUNTER=COUNTER-1 | |
done | |
} | |
function poke { | |
if curl $1 2> /dev/null | grep -q -i "html"; then | |
echo OK $1 | |
count_sheep | |
else | |
echo -en "\007" | |
poke $1 | |
fi | |
} | |
while : | |
do | |
poke "jonathanjl.com" | |
poke "cis195.com" | |
poke "slidefeed.com" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment