Created
March 14, 2019 11:32
-
-
Save lzakharov/420cce7478be6a509f226a29794f246d to your computer and use it in GitHub Desktop.
Wait for an HTTP endpoint to return 2xx Success with Bash and curl.
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
| echo 'Waiting for an HTTP endpoint to return 2xx' | |
| until $(curl --output /dev/null --silent --fail $1); do | |
| printf '.' | |
| sleep 5 | |
| done | |
| echo 'Success!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment