Created
August 9, 2016 12:22
-
-
Save desplesda/c0c24db84467f96979ffc5365392228f to your computer and use it in GitHub Desktop.
A little script to see if the @ABSCensus (http://census.abs.gov.au) is working or not, and when.
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
#!/usr/bin/env bash | |
echo "`date`: Starting to check the Census site" | |
# loops forever until you Ctrl-C it | |
while [[ 1 ]]; do | |
# check the main site, following any redirects | |
# dump all responses, we only care if it works (return code = 0) or not | |
curl -L -s http://census.abs.gov.au > /dev/null | |
if [[ $? == 0 ]]; then | |
echo "`date`: Census site is up; trying a login page" | |
# I got this URL from one of the few times I was able to load the main page; | |
# I expect that there are others, but this is a decent quick and dirty test | |
curl -L -s https://stream20.census.abs.gov.au:8443/eCensusWeb/login.jsp > /dev/null | |
if [[ $? == 0 ]]; then | |
echo "`date`: The login page is up, too" | |
else | |
echo "`date`: The login page is down" | |
fi | |
else | |
echo "`date`: Census site is down" | |
fi | |
# Wait 5 minutes before trying again | |
sleep 300 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The whole page is injected by JS! It's a vomitous blob!!