Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
database load script to use with docker, waits for db server to reply to ping.
#!/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
You can’t perform that action at this time.