mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-09 06:32:00 -03:30
* Update nextcloud to 24.0.4 * ncp-update-nc: Upgrade php to version 8.1 when installing NC >= 24 * ncp-update-nc: Use /etc/shadow workaround for installing systemd * ncp-update-nc: Run nc-limits after php upgrade * ncp-update-nc: Rollback after failed php upgrade * ncp-update-nc: Add success message * ncp-update-nc: Prevent installation of NC >= 24 on debian 10/PHP <= 7.3 * lamp.sh: Install php8.1 from sury.org * lamp.sh: Use /etc/shadow workaround for installing systemd * Dockerfile: Install wget, ca-certificates, lsb-release and procps before installing lamp.sh * Dockerfile: Make sure, ncp-templates are available when installing lamp.sh * Migrate all scripts to use template for writing opcache.ini and get_nc_config_value for retrieving datadir * nc-nextcloud.sh Fix crash if nc-datadir has not been installed yet * opcache.ini.sh: Don't try to get tmpl values from nc-datadir in containers
48 lines
1.3 KiB
Bash
48 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
## BACKWARD FIXES ( for older images )
|
|
|
|
source /usr/local/etc/library.sh # sets NCLATESTVER PHPVER RELEASE
|
|
|
|
# all images
|
|
|
|
# replace preview generator for the NCP version
|
|
[[ -d /var/www/nextcloud/apps/previewgenerator ]] && {
|
|
grep -q NCP /var/www/nextcloud/apps/previewgenerator &>/dev/null || {
|
|
cp -raT /var/www/nextcloud/apps/{previewgenerator,previewgenerator.orig}
|
|
cp -r /var/www/ncp-previewgenerator /var/www/nextcloud/apps/previewgenerator
|
|
chown -R www-data: /var/www/nextcloud/apps/previewgenerator
|
|
is_active_app nc-previews-auto && run_app nc-previews-auto
|
|
}
|
|
}
|
|
|
|
# reduce nc-scan-auto verbosity
|
|
is_active_app nc-scan-auto && run_app nc-scan-auto
|
|
|
|
# if using NCP original logo, replace with the new version
|
|
datadir=$(get_nc_config_value datadirectory)
|
|
id=$(grep instanceid /var/www/nextcloud/config/config.php | awk -F "=> " '{ print $2 }' | sed "s|[,']||g")
|
|
logo_dir="${datadir}/appdata_${id}/theming/images"
|
|
[[ -f "${logo_dir}"/logo ]] && {
|
|
sum_orig=ca39ff587bd899cb92eb0f5a6d429824
|
|
sum_curr=$(md5sum "${logo_dir}"/logo | awk '{ print $1 }')
|
|
[[ "${sum_orig}" == "${sum_curr}" ]] && {
|
|
cp etc/logo "${logo_dir}"/logo
|
|
cp etc/logo "${logo_dir}"/logoheader
|
|
}
|
|
}
|
|
|
|
# docker images only
|
|
[[ -f /.docker-image ]] && {
|
|
:
|
|
}
|
|
|
|
# for non docker images
|
|
[[ ! -f /.docker-image ]] && {
|
|
:
|
|
}
|
|
|
|
exit 0
|