Skip to content

Commit

Permalink
shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
MoustaphaCamara committed Dec 12, 2024
1 parent 4c6a28f commit cdd0ec1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions elabctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,11 @@ function update-db-schema
{
is-installed
# wait for mysql container to start, but only if there is one
if [ "$(docker ps | grep ${ELAB_MYSQL_CONTAINER_NAME})" ]; then
if docker ps | grep -q "${ELAB_MYSQL_CONTAINER_NAME}"; then
echo -n "Waiting for the MySQL container to be ready before running update..."
while true; do
# check if healthcheck is available or else will crash (e.g with older versions of elabFTW config files)
health_status=$(docker inspect -f '{{if .State.Health}}{{.State.Health.Status}}{{else}}no-healthcheck{{end}}' ${ELAB_MYSQL_CONTAINER_NAME})
# check if healthcheck is available or else will crash (e.g. with older versions of elabFTW config files)
health_status=$(docker inspect -f '{{if .State.Health}}{{.State.Health.Status}}{{else}}no-healthcheck{{end}}' "${ELAB_MYSQL_CONTAINER_NAME}")
if [ "$health_status" == "healthy" ]; then
break
fi
Expand Down

0 comments on commit cdd0ec1

Please sign in to comment.