Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>2022-09-15 18:21:58 +0300
committerthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-15 18:31:15 +0300
commitb675d61e61e11f14581eb82faeb5407cf61e0137 (patch)
tree27346f089663ae10cd8ea75c492414e69de82a0e /bin/ncp/CONFIG/nc-nextcloud.sh
parent6cd3b16de6a14ea8c17708d86d83a6b81ae30c83 (diff)
Upgrade to PHP 8.1 when installing NC >= 24 (#1554)
* 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
Diffstat (limited to 'bin/ncp/CONFIG/nc-nextcloud.sh')
-rw-r--r--bin/ncp/CONFIG/nc-nextcloud.sh21
1 files changed, 17 insertions, 4 deletions
diff --git a/bin/ncp/CONFIG/nc-nextcloud.sh b/bin/ncp/CONFIG/nc-nextcloud.sh
index 381aeb07..6a0c988a 100644
--- a/bin/ncp/CONFIG/nc-nextcloud.sh
+++ b/bin/ncp/CONFIG/nc-nextcloud.sh
@@ -14,6 +14,11 @@ REDIS_MEM=3gb
APTINSTALL="apt-get install -y --no-install-recommends"
export DEBIAN_FRONTEND=noninteractive
+tmpl_max_transfer_time()
+{
+ find_app_param nc-nextcloud MAXTRANSFERTIME
+}
+
install()
{
# During build, this step is run before ncp.sh. Avoid executing twice
@@ -145,10 +150,18 @@ configure()
fi
# create and configure opcache dir
- local OPCACHEDIR=/var/www/nextcloud/data/.opcache
- sed -i "s|^opcache.file_cache=.*|opcache.file_cache=$OPCACHEDIR|" /etc/php/${PHPVER}/mods-available/opcache.ini
- mkdir -p $OPCACHEDIR
- chown -R www-data:www-data $OPCACHEDIR
+ local OPCACHEDIR="$(
+ # shellcheck disable=SC2015
+ [ -f "${BINDIR}/CONFIG/nc-datadir.sh" ] && { source "${BINDIR}/CONFIG/nc-datadir.sh"; tmpl_opcache_dir; } || true
+ )"
+ if [[ -z "${OPCACHEDIR}" ]]
+ then
+ install_template "php/opcache.ini.sh" "/etc/php/${PHPVER}/mods-available/opcache.ini" --defaults
+ else
+ mkdir -p "$OPCACHEDIR"
+ chown -R www-data:www-data "$OPCACHEDIR"
+ install_template "php/opcache.ini.sh" "/etc/php/${PHPVER}/mods-available/opcache.ini"
+ fi
## RE-CREATE DATABASE TABLE
# launch mariadb if not already running (for docker build)