From b911388b8593ec294966f10cfc18eb5064b2c13e Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Wed, 11 Aug 2021 13:05:17 +0200 Subject: [PATCH] Added fix for Nextcloud php8.x (see #10) --- CMS/nextcloud/conf.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMS/nextcloud/conf.sh b/CMS/nextcloud/conf.sh index 32f1619..7c5c3b7 100644 --- a/CMS/nextcloud/conf.sh +++ b/CMS/nextcloud/conf.sh @@ -45,6 +45,17 @@ if [ "$shortdist" = "el8" ]; then restorecon -r /var/www/ > $OUTPUT 2>&1 fi +#PHP 8.0 Settings +if [ "$phpVerBranch" = "8x" ] then + if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then + if ! grep -Fxq "apc.enable_cli=1" /etc/php/${phpver}/mods-available/apcu.ini; then + echo "apc.enable_cli=1" >> /etc/php/${phpver}/mods-available/apcu.ini + fi + elif [ "$shortdist" = "el8" ]; then + sed -i "/apc.enable_cli/c\apc.enable_cli=1" /etc/opt/remi/php${phpver//.}/php.d/40-apcu.ini + fi + sed -i "/opcache.enable/c\php_admin_value[opcache.enable] = 1" "$phpPoolDir"/"$sitename".conf +fi #Makeing nextcloud Finalize script and setting login Notice curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/nextcloud-init.sh -o ~/NextcloudInit-"$sitename".sh