Improves the MariaDB wait command to use mariadb-admin ping for a better check if the server is up (#11396)

This commit is contained in:
Trenton H
2025-11-18 15:45:49 -08:00
committed by GitHub
parent 80be6793cf
commit 25b5e8fede

View File

@@ -51,7 +51,7 @@ wait_for_mariadb() {
local -r host="${PAPERLESS_DBHOST:-localhost}"
local -r port="${PAPERLESS_DBPORT:-3306}"
while ! true > "/dev/tcp/$host/$port"; do
while ! mariadb-admin --host="$host" --port="$port" ping --silent >/dev/null 2>&1; do
delay_next_attempt
done
echo "${LOG_PREFIX} Connected to MariaDB"