From 7079000ee06469ef3c75e374b21b43ddd6b2621f Mon Sep 17 00:00:00 2001 From: Peter Date: Fri, 27 Oct 2023 22:56:51 +0200 Subject: [PATCH] Update nextcloud.conf when updating nextcloud --- helper-scripts/nextcloud.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helper-scripts/nextcloud.sh b/helper-scripts/nextcloud.sh index 730e6124..5c703837 100755 --- a/helper-scripts/nextcloud.sh +++ b/helper-scripts/nextcloud.sh @@ -106,6 +106,10 @@ elif [[ ${NC_UPDATE} == "y" ]]; then exit 1 else docker exec -it -u www-data $(docker ps -f name=php-fpm-mailcow -q) bash -c "php /web/nextcloud/updater/updater.phar" + NC_SUBD=$(docker exec -i -u www-data $(docker ps -f name=php-fpm-mailcow -q) /web/nextcloud/occ config:system:get overwritehost) + mv ./data/conf/nginx/nextcloud.conf ./data/conf/nginx/nextcloud.conf-$(date +%s).bak + cp ./data/assets/nextcloud/nextcloud.conf ./data/conf/nginx/ + sed -i "s/NC_SUBD/${NC_SUBD}/g" ./data/conf/nginx/nextcloud.conf fi elif [[ ${NC_INSTALL} == "y" ]]; then