From 9c39606aab04ef641b56f1b8eac0b2b6c56c37b6 Mon Sep 17 00:00:00 2001 From: nachoparker Date: Sat, 23 Feb 2019 11:07:59 -0700 Subject: nc-nextcloud: disable .user.ini --- update.sh | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'update.sh') diff --git a/update.sh b/update.sh index c716fcbb..5f029f19 100755 --- a/update.sh +++ b/update.sh @@ -163,7 +163,7 @@ cp -r ncp-app /var/www/ # fix LE update bug [[ -d /etc/letsencrypt/archive ]] || { sleep 3 - cp -ravT /etc/letsencrypt-old/archive /etc/letsencrypt/archive || true + cp -ravT /etc/letsencrypt-old/archive /etc/letsencrypt/archive &>/dev/null || true bash -c "sleep 2 && service apache2 reload" &>/dev/null & } @@ -207,6 +207,31 @@ EOF ncc maintenance:mode --off } + # disable .user.ini + PHPVER=7.2 + [[ -f /etc/php/${PHPVER}/fpm/conf.d/90-ncp.ini ]] || { + MAXFILESIZE="$(grep upload_max_filesize /var/www/nextcloud/.user.ini | cut -d= -f2)" + MEMORYLIMIT="$(grep memory_limit /var/www/nextcloud/.user.ini | cut -d= -f2)" + cat > /etc/php/${PHPVER}/fpm/conf.d/90-ncp.ini < https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815968 # Bug #416 reappeared after we moved to php7.2 and debian buster packages. (keep last) [[ "$( ls -l /etc/php/7.2/fpm/conf.d/*-opcache.ini | wc -l )" -gt 1 ]] && rm "$( ls /etc/php/7.2/fpm/conf.d/*-opcache.ini | tail -1 )" -- cgit v1.2.3