Skip to content

Instantly share code, notes, and snippets.

@pelletier
Created July 27, 2011 12:46
Show Gist options
  • Save pelletier/1109290 to your computer and use it in GitHub Desktop.
Save pelletier/1109290 to your computer and use it in GitHub Desktop.
Test website up (200 OK)
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