Created
August 15, 2012 15:48
-
-
Save brookemckim/3361131 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
host=$1 | |
response_code=$(curl -sL -w "%{http_code}" --connect-timeout 10 --digest -X PUT $host -o /dev/null) | |
case $response_code in | |
[2][0-9][0-9]) echo "OK"; exit 0;; | |
*) echo "Critical $response_code"; exit 3;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment