-
-
Save scruffyfox/11a4e73227ce307026c4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash | |
while [ 1 ]; do | |
RESP=$(curl -o /dev/null --silent --head --write-out '%{http_code}\n' 'http://www.dota2.com/687') | |
if [ "$RESP" = 200 ]; then | |
echo "***** PATCH OUT HYPE ******" | |
exit | |
else | |
echo "not out" | |
fi | |
sleep 3 | |
done | |
exit |
Thanks!
@benhorst 6.86/10 would hype again
You can add curl -X POST http://textbelt.com/text -d number=[PHONE NUMBER] -d "message=PATCH IS OUT"
between line 5 and 6 to get a nice text message so you don't have to stare at your terminal window 😄
I changed my check to this (in case the title stays the same, I think this is more likely to change):
if [[ $RESP != *"<div id=\"Teaser\"></div>"* ]]; then
And added a slack alert for my friends:
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/{{your slack url integration here}}
And added a date to the print so that it is obvious if it hangs:
echo $(date) " not out"
Thank you. Now my terminal is filled with 'not out' and I'm not sure if it's comforting that I'm not missing anything, or a constant reminder of how much the hype needs to leave my body.