]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Improves the MariaDB wait command to use mariadb-admin ping for a better check if...
authorTrenton H <797416+stumpylog@users.noreply.github.com>
Tue, 18 Nov 2025 23:45:49 +0000 (15:45 -0800)
committerGitHub <noreply@github.com>
Tue, 18 Nov 2025 23:45:49 +0000 (23:45 +0000)
docker/rootfs/etc/s6-overlay/s6-rc.d/init-wait-for-db/run

index 1739edd61454ffcee1ca90f4af142bb6c8d55b37..9278e787d547fe5edfab6063e6cf039b9f8c70ff 100755 (executable)
@@ -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"