Last active
January 19, 2017 15:02
-
-
Save benbc/9348263096fd108e6324d6ddf52d0ccf 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