Skip to content

Instantly share code, notes, and snippets.

@BrianMMcClain
Created October 23, 2012 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrianMMcClain/3940279 to your computer and use it in GitHub Desktop.
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
#!/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