mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
v1.50.1.sh: Fix missing PHP 8 configuration on docker
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
parent
6a2867e638
commit
d784a6a932
@ -6,6 +6,44 @@ source /usr/local/etc/library.sh
|
||||
|
||||
install_template systemd/notify_push.service.sh /etc/systemd/system/notify_push.service
|
||||
|
||||
if is_docker
|
||||
then
|
||||
|
||||
clear_opcache
|
||||
bash -c "sleep 6; service php${PHPVER}-fpm restart" &>/dev/null &
|
||||
echo "Upgrading PHP..."
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
PHPVER_OLD="7.4"
|
||||
PHPVER_NEW="8.1"
|
||||
|
||||
php_restore() {
|
||||
trap "" INT TERM HUP ERR
|
||||
echo "Something went wrong while upgrading PHP. Rolling back..."
|
||||
set +e
|
||||
a2disconf php${PHPVER_NEW}-fpm
|
||||
set_ncpcfg "php_version" "${PHPVER_OLD}"
|
||||
install_template "php/opcache.ini.sh" "/etc/php/${PHPVER_OLD}/mods-available/opcache.ini"
|
||||
clear_opcache
|
||||
run_app nc-limits
|
||||
a2enconf "php${PHPVER_OLD}-fpm"
|
||||
service "php${PHPVER_OLD}-fpm" start
|
||||
service apache2 restart
|
||||
echo "PHP upgrade has been reverted. Please downgrade to the previous docker image"
|
||||
}
|
||||
|
||||
trap php_restore INT TERM HUP ERR
|
||||
|
||||
# Setup apt repository for php 8
|
||||
|
||||
a2disconf "php${PHPVER_OLD}-fpm"
|
||||
set_ncpcfg "php_version" "${PHPVER_NEW}"
|
||||
install_template "php/opcache.ini.sh" "/etc/php/${PHPVER_NEW}/mods-available/opcache.ini"
|
||||
( set -e; export PHPVER="${PHPVER_NEW}"; run_app nc-limits )
|
||||
clear_opcache
|
||||
a2enconf "php${PHPVER_NEW}-fpm"
|
||||
service "php${PHPVER_NEW}-fpm" start
|
||||
service apache2 restart
|
||||
|
||||
else
|
||||
|
||||
clear_opcache
|
||||
bash -c "sleep 6; service php${PHPVER}-fpm restart" &>/dev/null &
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user