diff --git a/scripts/features/php8.2.sh b/scripts/features/php8.2.sh index cff621735..3d09ef7a9 100644 --- a/scripts/features/php8.2.sh +++ b/scripts/features/php8.2.sh @@ -10,6 +10,14 @@ fi export DEBIAN_FRONTEND=noninteractive +SERVICE_STATUS=$(systemctl is-enabled php8.2-fpm.service) + +if [ "$SERVICE_STATUS" == "disabled" ]; +then + systemctl enable php8.2-fpm + service php8.2-fpm restart +fi + if [ -f /home/$WSL_USER_NAME/.homestead-features/php82 ] then echo "PHP 8.2 already installed." @@ -60,3 +68,6 @@ sed -i "s/group = www-data/group = vagrant/" /etc/php/8.2/fpm/pool.d/www.conf sed -i "s/listen\.owner.*/listen.owner = vagrant/" /etc/php/8.2/fpm/pool.d/www.conf sed -i "s/listen\.group.*/listen.group = vagrant/" /etc/php/8.2/fpm/pool.d/www.conf sed -i "s/;listen\.mode.*/listen.mode = 0666/" /etc/php/8.2/fpm/pool.d/www.conf + +systemctl enable php8.2-fpm +service php8.2-fpm restart