Created
March 24, 2011 21:02
-
-
Save monkeydom/885877 to your computer and use it in GitHub Desktop.
Apple store is down script
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 | |
WaitForDown=true | |
while true; do | |
StoreUp=`curl -s http://store.apple.com/de | grep "Mac kaufen" | wc -l` | |
if [ $StoreUp -eq 0 ]; then | |
if $WaitForDown; then | |
WaitForDown=false | |
date | |
echo "The Apple Store is Down!" | |
say "The Apple Store is Down!" | |
fi | |
sleep 5 | |
else | |
if $WaitForDown; then | |
echo -n "still up. " | |
sleep 5 | |
else | |
say "It is up, buy now!" | |
echo "It is up, buy now!" | |
sleep 1 | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment