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}