Add wait-for-mysql script.

This commit is contained in:
Greyscale 2020-11-19 03:19:10 +01:00
parent dc7080f5dc
commit da492c940f
No known key found for this signature in database
GPG key ID: C6178C19949CFFE3
2 changed files with 9 additions and 1 deletions

7
bin/wait-for-mysql Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
echo -n "Waiting for MySQL..."
while ! mysqladmin ping -h"$DB_HOST" --silent; do
sleep 1
echo -n "."
done
echo -e "\nConnected to MySQL!"

View file

@ -31,6 +31,7 @@
}
},
"bin": [
"bin/laminator"
"bin/laminator",
"bin/wait-for-mysql"
]
}