Skip to content

Instantly share code, notes, and snippets.

@epcim
Forked from rgl/wait_for_http_200.sh
Created August 26, 2019 09:53
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 epcim/fbed6db3a1537ad19f9b85d680912c0c to your computer and use it in GitHub Desktop.
Save epcim/fbed6db3a1537ad19f9b85d680912c0c to your computer and use it in GitHub Desktop.
Wait for an HTTP endpoint to return 200 OK with Bash and curl
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done'
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment