Skip to content

Instantly share code, notes, and snippets.

@bjeavons
Created June 11, 2012 19:18
Show Gist options
  • Save bjeavons/2912095 to your computer and use it in GitHub Desktop.
Save bjeavons/2912095 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
CURL="/usr/bin/curl"
GROWL="/usr/local/bin/growlnotify"
URL=$1
CODE=`$CURL -sL -w "%{http_code}" $1 -o /dev/null`
if [ "$CODE" -ne 200 ]
then $GROWL -t "IS DOWN" -m "$URL"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment