Skip to content

Instantly share code, notes, and snippets.

@adamesque
Created March 9, 2012 19:13
Show Gist options
  • Save adamesque/2008152 to your computer and use it in GitHub Desktop.
Save adamesque/2008152 to your computer and use it in GitHub Desktop.
Notify folks as soon as the 2012 txjs site is updated.
#!/bin/bash
CHECK=`/usr/bin/curl --write-out %{size_download} --silent --output /dev/null 2012.texasjavascript.com`
cd ~
if [ $CHECK != 123 ] && [ ! -e '.2012.txjs.sent' ]
then
/usr/bin/curl -s -k --user api:key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
https://api.mailgun.net/v2/xxxxxxxxxxx.mailgun.org/messages \
-F from=' <txjsbot@xxxxxxxxxxx.mailgun.org>' \
-F to=xx@xxxxxxxxxxx.com\
-F to=xxxx@xxxxxxxx.com\
-F to=xxxxxxxxxxxxxxxx@xxxxx.com\
-F h:X-Priority=1\
-F h:Importance=high\
-F subject='2012.texasjavascript.com' \
-F text='Check it! Something changed at http://2012.texasjavascript.com' > .2012.txjs.sent
else
echo "Still no news."
echo $CHECK
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment