Skip to content

Instantly share code, notes, and snippets.

@mattrose
Created March 6, 2018 03:22
Show Gist options
  • Save mattrose/27a08a0124528718f8d9e3661014c132 to your computer and use it in GitHub Desktop.
Save mattrose/27a08a0124528718f8d9e3661014c132 to your computer and use it in GitHub Desktop.
See if the ottawa swim registration page is responding
#!/bin/bash
### Requires MacOS Mavericks or later (for the notification stuff)
### Pretty useless, just lets you know when the page doesn't respond with that stupid "We are busy" page.
### If anyone in ottawa has any idea on how grab some kind of session id from that, i'd appreciate knowing it!
set -x ;
while [ 1 ] ; do
if curl -s 'https://apps102.ottawa.ca/Start/Start.asp?LanguageId=1&LanguageIndex=1' | grep 'We are busy processing registrations!' ; then
sleep 5
else
/usr/bin/osascript -e "display notification \"Ottawa registration page free\""
break
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment