From 5ab67cea1edf49811040139aafde505135fffda0 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 18 Feb 2023 19:03:26 +0100 Subject: [PATCH] also overwrite db_name to fix db migration Signed-off-by: Simon L --- Containers/nextcloud/start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 88a7ac10..569652d2 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -17,10 +17,11 @@ if [ -f "/var/www/html/config/config.php" ]; then echo "Waiting for the database to start..." sleep 5 done - if [ "$POSTGRES_USER" = "oc_nextcloud" ] && echo "$POSTGRES_PASSWORD" | grep -q '^[a-z0-9]\+$'; then - # this was introduced with https://github.com/nextcloud/all-in-one/pull/218 + if [ "$POSTGRES_USER" = "oc_nextcloud" ] && [ "$POSTGRES_DB" = "nextcloud_database" ] && echo "$POSTGRES_PASSWORD" | grep -q '^[a-z0-9]\+$'; then + # This was introduced with https://github.com/nextcloud/all-in-one/pull/218 sed -i "s|'dbuser'.*=>.*$|'dbuser' => '$POSTGRES_USER',|" /var/www/html/config/config.php sed -i "s|'dbpassword'.*=>.*$|'dbpassword' => '$POSTGRES_PASSWORD',|" /var/www/html/config/config.php + sed -i "s|'db_name'.*=>.*$|'db_name' => '$POSTGRES_DB',|" /var/www/html/config/config.php fi fi