Skip to content

Instantly share code, notes, and snippets.

@lauer
Created April 13, 2010 11:05
Show Gist options
  • Save lauer/364507 to your computer and use it in GitHub Desktop.
Save lauer/364507 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Check if Apple Store is back each 30 seconds
#
while [ "0" = "0" ]
do
curlgrep=`curl http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore 2>/dev/null | grep "back soon"`
if [ "$curlgrep" = "" ]
then
osascript -e "tell application \"System Events\" to display dialog \"Apple Store back online\nhttp://store.apple.com\"" &
exit
else
echo "not yet"
fi
sleep 30
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment