-
-
Save jexp/1e295d5f5b96e8e42fb614232abdbb4f to your computer and use it in GitHub Desktop.
Example of using curl to wait for a Neo4j server to be up
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
#!/bin/bash | |
end="$((SECONDS+10))" | |
while true; do | |
[[ "200" = "$(curl --silent --write-out %{http_code} --output /dev/null http://localhost:7474)" ]] && break | |
[[ "${SECONDS}" -ge "${end}" ]] && exit 1 | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment