From a8b5df25d0ca1e901ce4077c21eaeca609f5f874 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 9 Jan 2023 14:46:08 +0800 Subject: [PATCH] =?UTF-8?q?php-yum=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/php-yum/versions/common.sh | 2 ++ plugins/php-yum/versions/lib.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/php-yum/versions/common.sh b/plugins/php-yum/versions/common.sh index c0ec215c9..d69af2774 100644 --- a/plugins/php-yum/versions/common.sh +++ b/plugins/php-yum/versions/common.sh @@ -51,5 +51,7 @@ fi echo "yum install -y php${version}-php-${extName}" echo "yum remove -y php${version}-php-${extName}" +bash ${rootPath}/plugins/php-yum/versions/lib.sh $version restart + diff --git a/plugins/php-yum/versions/lib.sh b/plugins/php-yum/versions/lib.sh index 5702d47ed..59e391be9 100644 --- a/plugins/php-yum/versions/lib.sh +++ b/plugins/php-yum/versions/lib.sh @@ -11,9 +11,9 @@ serverPath=$(dirname "$rootPath") version=$1 action=$2 -if [ -f /lib/systemd/system/php${version}.service ];then +if [ -f /lib/systemd/system/php${version}-php-fpm.service ];then systemctl ${action} php${version} -elif [[ -f /usr/lib/systemd/system/php${version}.service ]]; then +elif [[ -f /usr/lib/systemd/system/php${version}-php-fpm.service ]]; then systemctl ${action} php${version} else $serverPath/php/init.d/php${version} ${action}