-
-
Save mneedham/b061f8bfc4b92a272d6362d05648dd2b 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 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
#!/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