1 2 3 4 5 6 7
#!/bin/bash until mysql -h"compass-db" -u"root" -p"root" -e 'show databases'; do >&2 echo "DB is unavailable - sleeping" sleep 1 done >&2 echo "DB is up" systemctl start httpd