Created
October 23, 2012 17:41
-
-
Save BrianMMcClain/3940279 to your computer and use it in GitHub Desktop.
Checks if the apple store is up every 15 seconds and sends a notification when it's up
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 | |
gem install terminal-notifier | |
while [ True ] | |
curl -s http://store.apple.com/ | grep -q "alt=\"We'll be back soon\"" | |
do | |
if [ $? -eq 0 ] | |
then | |
echo "Store is down" | |
else | |
echo "Store is up" | |
terminal-notifier -message "The Apple Store is UP!" -title "Apple Store" -group 1 | |
break | |
fi | |
sleep 15 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment