From a27f51abdcfd1e168861e44758e7e601ef2ca08b Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Fri, 26 Jul 2024 13:51:47 +0200 Subject: [PATCH] nextcloud: allow to skip database optimization Signed-off-by: Simon L. --- Containers/nextcloud/entrypoint.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 8f564241796..ffde22b9028 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -295,7 +295,6 @@ DATADIR_PERMISSION_CONF php /var/www/html/occ app:disable updatenotification rm -rf /var/www/html/apps/updatenotification php /var/www/html/occ app:enable nextcloud-aio --force - php /var/www/html/occ db:add-missing-indices php /var/www/html/occ db:add-missing-columns php /var/www/html/occ db:add-missing-primary-keys yes | php /var/www/html/occ db:convert-filecache-bigint @@ -423,12 +422,12 @@ DATADIR_PERMISSION_CONF # Apply optimization echo "Doing some optimizations..." php /var/www/html/occ maintenance:repair - php /var/www/html/occ db:add-missing-indices - php /var/www/html/occ db:add-missing-columns - php /var/www/html/occ db:add-missing-primary-keys - yes | php /var/www/html/occ db:convert-filecache-bigint - php /var/www/html/occ maintenance:mimetype:update-js - php /var/www/html/occ maintenance:mimetype:update-db + if [ "$NEXTCLOUD_SKIP_DATABASE_OPTIMIZATION" != yes ]; then + php /var/www/html/occ db:add-missing-indices + php /var/www/html/occ db:add-missing-columns + php /var/www/html/occ db:add-missing-primary-keys + yes | php /var/www/html/occ db:convert-filecache-bigint + fi fi fi