diff options
author | nachoparker <nacho@ownyourbits.com> | 2019-02-23 21:07:59 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-03-05 21:22:12 +0300 |
commit | 9c39606aab04ef641b56f1b8eac0b2b6c56c37b6 (patch) | |
tree | 51cf8700e4fa3255d59b8cc71b802ad2e9900cb0 /update.sh | |
parent | bf1fc1fd87b3efac2c8051e8bf09385f4e34460d (diff) |
nc-nextcloud: disable .user.iniv1.8.4
Diffstat (limited to 'update.sh')
-rwxr-xr-x | update.sh | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -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 <<EOF +; disable .user.ini files for performance and workaround NC update bugs +user_ini.filename = + +; from Nextcloud .user.ini +upload_max_filesize=$MAXFILESIZE +post_max_size=$MAXFILESIZE +memory_limit=$MEMORYLIMIT +mbstring.func_overload=0 +always_populate_raw_post_data=-1 +default_charset='UTF-8' +output_buffering=0 + +; slow transfers will be killed after this time +max_execution_time=3600 +max_input_time=3600 +EOF + bash -c "sleep 3 && service php$PHPVER-fpm restart" & + } + # remove redundant opcache configuration. Leave until update bug is fixed -> 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 )" |