mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-21 10:50:10 +00:00
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
18 lines
473 B
Bash
18 lines
473 B
Bash
#!/bin/bash
|
|
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH <https://nextcloud.com>
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
set -x
|
|
fi
|
|
|
|
test -f "/mnt/data/backup-is-running" && exit 0
|
|
|
|
# If database import is running, do not continue with the health check
|
|
if nc -z 127.0.0.1 11000; then
|
|
exit 0
|
|
fi
|
|
|
|
PGPASSWORD="$POSTGRES_PASSWORD" psql -h 127.0.0.1 -p 5432 -U "oc_$POSTGRES_USER" -d "$POSTGRES_DB" -c "select now()" || exit 1
|