Created
June 16, 2015 20:52
-
-
Save tomdavidson/3ba6b085a117d81a52d3 to your computer and use it in GitHub Desktop.
database load script to use with docker, waits for db server to reply to ping.
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 | |
tar -xvf /tmp/build-data/sandbox_sql.tar.gz -C /tmp/build-data | |
while ! ping -c1 expressionengine &>/dev/null; do sleep 2; echo "waiting on expressionengine"; done | |
mysql -hexpressionengine -uroot -proot sandbox_expressionengine < /tmp/build-data/sandbox_expressionengine.sql | |
while ! ping -c1 wowzalicensing &>/dev/null; do sleep 2; echo "waiting on wowzalicensing"; done | |
mysql -hwowzalicensing -uroot -proot sandbox_wowzalicensing < /tmp/build-data/sandbox_wowzalicensing.sql | |
while ! ping -c1 wowzamedia &>/dev/null; do sleep 2; echo "waiting on wowzamedia"; done | |
mysql -hwowzamedia -uroot -proot sandbox_wowzamedia < /tmp/build-data/sandbox_wowzamedia.sql | |
rm /tmp/build-data/*.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment