Skip to content

Instantly share code, notes, and snippets.

@sankalp-khare
Created August 27, 2015 10:14
Show Gist options
  • Save sankalp-khare/deedc8b6da0830a94226 to your computer and use it in GitHub Desktop.
Save sankalp-khare/deedc8b6da0830a94226 to your computer and use it in GitHub Desktop.
script that alerts when sat website's maintenance message goes away
#!/bin/bash
while curl -k --silent -A 'Mozilla/6.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' 'https://sat.collegeboard.org' | grep '<h1 class="title" id="page-title">Temporarily Unavailable</h1>' >/dev/null 2>&1
do
gdate -R | tr -d '\n'
echo " | Site still in maintenance mode"
sleep 10
done
osascript -e 'tell app "System Events" to display alert "SAT Website seems to be back" message "Maintenance message has disappeared!"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment