Created
June 6, 2012 19:37
-
-
Save pdt256/2884166 to your computer and use it in GitHub Desktop.
Wait for AWS instance and MySQL service to start in Bash
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 | |
echo -n "Waiting for MySQL to start." | |
while :; do | |
ssh 10.0.0.5 "mysql -e 'select @@hostname'" &> /dev/null | |
[ $? -eq 0 ] && break | |
echo -n '.' | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment