Created
July 10, 2017 15:02
-
-
Save cwilper/13de42cacbe7eed8545ee1d5f0f69d0a to your computer and use it in GitHub Desktop.
Checks if a given url returns 200 ok and returns 0 if so, returns 1 (error) otherwise
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/sh | |
curl -Ssf "$1" > /dev/null | |
if [[ $? -ne 0 ]]; then | |
echo "Error: Non-200 returned for url $1" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment