From 44ab5759a82296c81afd785c58f02e89977d6785 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Fri, 30 Aug 2024 14:54:56 -0700 Subject: [PATCH] use update-alternatives for php-fpm-vpanel.sock --- etc/php/fpm/pool.d/vpanel.conf | 2 +- install.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/etc/php/fpm/pool.d/vpanel.conf b/etc/php/fpm/pool.d/vpanel.conf index 19c55b5..9fb9c37 100644 --- a/etc/php/fpm/pool.d/vpanel.conf +++ b/etc/php/fpm/pool.d/vpanel.conf @@ -1,7 +1,7 @@ [vpanel] user = vpanel group = vpanel -listen = /run/php/php-fpm-vpanel.sock +listen = /run/php/phpPHPVERSION-fpm-vpanel.sock listen.owner = www-data listen.group = www-data pm = ondemand diff --git a/install.sh b/install.sh index 37215f8..effeed7 100755 --- a/install.sh +++ b/install.sh @@ -12,8 +12,11 @@ mkdir etc/php/$phpVersion mv etc/php/fpm etc/php/$phpVersion/ cp -a etc/* /etc/ chmod 440 /etc/sudoers.d/vpanel -a2enconf vpanel sed -i "s|;process_control_timeout = 0|process_control_timeout = 1s|g" /etc/php/$phpVersion/fpm/php-fpm.conf +sed -i "s|PHPVERSION|$phpVersion|g" /etc/php/$phpVersion/fpm/php-fpm.conf +phpPriority=$PHP_MAJOR_VERSION$PHP_MINOR_VERSION +update-alternatives --install /run/php/php-fpm-vpanel.sock php-fpm-vpanel.sock /run/php/php$phpVersion-fpm-vpanel.sock $phpPriority +a2enconf vpanel service php$phpVersion-fpm restart service apache2 restart cp -a panel /srv/www/html/