Compare commits

..

2 Commits

Author SHA1 Message Date
waja
13d43c1b51
Merge 2fa2b3f47926a1e7c54ea31fed651bce6b41053e into 1ee6c08552e3fc0ba1dfdcdac0604f86eab04d8c 2023-12-21 13:46:27 +00:00
Jan Wagner
2fa2b3f479 Check if db is available, not just in setup
Checking for a available database when installing is fine, but running
occ upgrade without a db available is also a problem. This checks for db
availability in every case.
2023-12-21 14:46:12 +01:00

View File

@ -16,7 +16,7 @@ if [ "$PHP_HARDENING" == "true" ] && [ ! -f /usr/local/etc/php/conf.d/snuffleupa
fi fi
# Check if database is available # Check if database is available
if [ ${DB_TYPE} != "sqlite3" ]; then if [ -n "${DB_TYPE}" ] && [ "${DB_TYPE}" != "sqlite3" ]; then
until nc -z "${DB_HOST:-nextcloud-db}" "${DB_PORT:-3306}" until nc -z "${DB_HOST:-nextcloud-db}" "${DB_PORT:-3306}"
do do
echo "waiting for the database container..." echo "waiting for the database container..."