Skip to content

Commit

Permalink
Move wait for mariadb readiness at a later stage
Browse files Browse the repository at this point in the history
  • Loading branch information
xZero707 committed Sep 22, 2023
1 parent fea9d6a commit c3ba2d7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/mariadb-bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,6 @@ function checkHashUpdate() {
main() {
printf "[MariaDB Runtime Bootstrap v2.1]\n"

until db-util healthcheck >/dev/null 2>&1; do
printf "Waiting for MariaDB to become ready...\n"
sleep 0.5
done

printf "MariaDB ready. Proceeding with initialization\n"

if [ -n "${MARIADB_USERNAME}" ]; then
printf "Warning: MARIADB_USERNAME is deprecated. Please use MARIADB_INIT_USERS instead\n" >&2

Expand Down Expand Up @@ -174,6 +167,13 @@ main() {
MARIADB_INIT_DATABASES=""
fi

until db-util healthcheck >/dev/null 2>&1; do
printf "Waiting for MariaDB to become ready...\n"
sleep 0.5
done

printf "MariaDB ready. Proceeding with initialization\n"

if [ -n "${MARIADB_INIT_USERS}" ]; then
printf "Initializing users...\n"

Expand Down

0 comments on commit c3ba2d7

Please sign in to comment.