Last active
March 7, 2024 17:08
-
-
Save rgl/f90ff293d56dbb0a1e0f7e7e89a81f42 to your computer and use it in GitHub Desktop.
Wait for an HTTP endpoint to return 200 OK with Bash and curl
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
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
Thank you that looks neat