use update-alternatives for php-fpm-vpanel.sock

This commit is contained in:
Matthew Saunders Brown 2024-08-30 14:54:56 -07:00
parent ed48b46060
commit 44ab5759a8
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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/