Last active
May 6, 2019 07:20
-
-
Save peacengell/b6f3b761bc469315d900ffaa302d56da 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 | |
SERVER_URL="$1" | |
KEY_WORD="$2" | |
SLEEP_TIME="$3" | |
if [ -z "$3" ] | |
then | |
SLEEP_TIME=50 | |
else | |
SLEEP_TIME="$3" | |
fi | |
sleep ${SLEEP_TIME} | |
if curl -Ls "$SERVER_URL" | grep "$KEY_WORD" | |
then | |
echo "Validation: Success" | |
else | |
echo "Failed" | |
exit 1 | |
fi |
Added -L for following redirection
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To check if website is up after deployment.