Skip to content

Instantly share code, notes, and snippets.

@peacengell
Last active May 6, 2019 07:20
Show Gist options
  • Save peacengell/b6f3b761bc469315d900ffaa302d56da to your computer and use it in GitHub Desktop.
Save peacengell/b6f3b761bc469315d900ffaa302d56da to your computer and use it in GitHub Desktop.
#!/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
@peacengell
Copy link
Author

To check if website is up after deployment.

@peacengell
Copy link
Author

Added -L for following redirection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment