Skip to content

Instantly share code, notes, and snippets.

@vanduc95
Created March 14, 2019 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanduc95/b122f85df620a32c928e2ef8ee439d46 to your computer and use it in GitHub Desktop.
Save vanduc95/b122f85df620a32c928e2ef8ee439d46 to your computer and use it in GitHub Desktop.
test_command='curl -sL \
-w "%{http_code}\\n" \
"http://localhost:8000/people/" \
-o /dev/null \
--connect-timeout 3 \
--max-time 5'
if [[ $(test_command) == "200" ]] ;
then
echo "OK" ;
else
echo "KO" ;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment