Created
July 27, 2011 12:46
-
-
Save pelletier/1109290 to your computer and use it in GitHub Desktop.
Test website up (200 OK)
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
while true; do | |
string=`curl --silent -I "$1"` | |
if [[ $string == *"200 OK"* ]] | |
then | |
echo "ok"; | |
else | |
echo "RED ALERT!"; | |
fi | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment