Skip to content

Instantly share code, notes, and snippets.

@benhorst
Forked from scruffyfox/687.sh
Last active December 15, 2015 20:13
Show Gist options
  • Save benhorst/3c40d359051c9e40e870 to your computer and use it in GitHub Desktop.
Save benhorst/3c40d359051c9e40e870 to your computer and use it in GitHub Desktop.
Checks every 3 seconds if patch is out
#!/usr/bin/env zsh
while [ 1 ]; do
RESP=$(curl --silent 'http://www.dota2.com/686')
if [[ $RESP != *"<div id=\"Teaser\"></div>"* ]]; then
curl -X POST --data-urlencode 'payload={"color":"danger","pretext":"6.86 Alert! Patch page change","text":"@channel check http://dota2.com/686 for update"}' https://hooks.slack.com/services/{{slack team integration here}}}}
exit
else
echo $(date) " not out"
fi
sleep 3
done
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment