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