diff options
author | nachoparker <nacho@ownyourbits.com> | 2019-06-30 00:14:46 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-06-30 00:14:46 +0300 |
commit | ce4477c8a4c101b416ebb2711b3c22a42ffc0051 (patch) | |
tree | d8073313005a22bcc1db4d12386b682ed98d1b6c | |
parent | 0701949f01f8fd1a00f63b721d621dcff7f6b20b (diff) |
nc-previews: adjust preview sizesv1.13.4
Signed-off-by: nachoparker <nacho@ownyourbits.com>
-rw-r--r-- | bin/ncp/CONFIG/nc-init.sh | 8 | ||||
-rwxr-xr-x | update.sh | 11 |
2 files changed, 16 insertions, 3 deletions
diff --git a/bin/ncp/CONFIG/nc-init.sh b/bin/ncp/CONFIG/nc-init.sh index 473f6a45..2f940477 100644 --- a/bin/ncp/CONFIG/nc-init.sh +++ b/bin/ncp/CONFIG/nc-init.sh @@ -157,9 +157,11 @@ EOF ncc app:enable previewgenerator # previews - ncc config:app:set previewgenerator squareSizes --value="32" - ncc config:app:set previewgenerator widthSizes --value="128 256 512" - ncc config:app:set previewgenerator heightSizes --value="128 256" + ncc config:app:set previewgenerator squareSizes --value="32 256" + ncc config:app:set previewgenerator widthSizes --value="256 384" + ncc config:app:set previewgenerator heightSizes --value="256" + ncc config:system:set preview_max_x --value 2048 + ncc config:system:set preview_max_y --value 2048 ncc config:system:set jpeg_quality --value 60 # other @@ -238,6 +238,17 @@ EOF # fix logrotate files chmod 0444 /etc/logrotate.d/* + # adjust preview sizes + [[ "$(ncc config:system:get preview_max_x)" == "" ]] && { + ncc config:app:set previewgenerator squareSizes --value="32 256" + ncc config:app:set previewgenerator widthSizes --value="256 384" + ncc config:app:set previewgenerator heightSizes --value="256" + ncc config:system:set preview_max_x --value 2048 + ncc config:system:set preview_max_y --value 2048 + ncc config:system:set jpeg_quality --value 60 + } + + # 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 )" |