Skip to content

Instantly share code, notes, and snippets.

@rgl
Created August 25, 2016 07:43
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rgl/c2ba64b7e2a5a04d1eb65983995dce76 to your computer and use it in GitHub Desktop.
Save rgl/c2ba64b7e2a5a04d1eb65983995dce76 to your computer and use it in GitHub Desktop.
Wait for an HTTP endpoint to return a given JSON property value with Bash, curl and jq
bash -c 'while [[ "$(curl -s localhost:9000/api/system/status | jq --raw-output ''.status'')" != "UP" ]]; do sleep 5; done'
# also check https://gist.github.com/rgl/f90ff293d56dbb0a1e0f7e7e89a81f42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment