Created
November 26, 2014 09:48
-
-
Save sebw/529d3e12ab2556d8165d to your computer and use it in GitHub Desktop.
Bash: loop until a network connection is successful
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
while ! nc -vz localhost 3306; do sleep 1; done | |
echo 'Database is available' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment