mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-02 11:15:09 -05:00
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:
parent
80be6793cf
commit
25b5e8fede
@ -51,7 +51,7 @@ wait_for_mariadb() {
|
|||||||
local -r host="${PAPERLESS_DBHOST:-localhost}"
|
local -r host="${PAPERLESS_DBHOST:-localhost}"
|
||||||
local -r port="${PAPERLESS_DBPORT:-3306}"
|
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
|
delay_next_attempt
|
||||||
done
|
done
|
||||||
echo "${LOG_PREFIX} Connected to MariaDB"
|
echo "${LOG_PREFIX} Connected to MariaDB"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user