Created
August 27, 2015 10:14
-
-
Save sankalp-khare/deedc8b6da0830a94226 to your computer and use it in GitHub Desktop.
script that alerts when sat website's maintenance message goes away
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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