MI-DPLA / combine-docker

Combine Docker-ized
https://mi-dpla.github.io/combine-docker/
6 stars 12 forks source link

Fix while loop test #37

Closed fruviad closed 4 years ago

fruviad commented 4 years ago

The while loop testing the readiness of MySQL is waiting on output from:

   mysqladmin ping -h "mysql" --port=3307 -pcombine --silent

Output will either be nothing (if it is not ready) or the string "mysqld is alive". Surrounding the above (slightly edited) with double quotes & back ticks:

   "`mysqladmin ping -h mysql --port=3307 -pcombine --silent`"

allows the ! to operate on the entire return value "mysqld is alive", whereas not doing so results in the error:

   waiting for MySQL container to be ready...
   ./combine_db_prepare.sh: line 5: [: too many arguments