Created
October 22, 2014 14:07
-
-
Save kconner/57331b140a610e6ae9e5 to your computer and use it in GitHub Desktop.
Monitor whether a given URL gives you a 200
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 | |
echo "Monitoring." | |
while true; do | |
if curl -s --head $1 | grep "200 OK" > /dev/null; then | |
echo "ok" $1 | |
else | |
echo ":(" $1 | |
fi | |
sleep 60 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment