From 30bc4365cb7f8adcef4f9dba87567c3da8d84ed7 Mon Sep 17 00:00:00 2001 From: Adrien Smith Date: Mon, 12 Feb 2024 08:30:07 -0700 Subject: [PATCH] fix: Ensure php8.2-fpm service is correctly enabled and restarted --- scripts/features/php8.2.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) 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