Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdserver-web/plugins/php-yum/versions/lib.sh

29 lines
772 B

3 years ago
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
curPath=`pwd`
rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
version=$1
action=$2
11 months ago
11 months ago
php_fpm_service_file=/lib/systemd/system/php${version}-php-fpm.service
if [ -f /usr/lib/systemd/system/php${version}-php-fpm.service ];then
php_fpm_service_file=/lib/systemd/system/php${version}-php-fpm.service
fi
11 months ago
php_status=`systemctl status php${version}-php-fpm | grep inactive`
if [ "$php_status" != "" ];then
systemctl ${action} php${version}-php-fpm
fi
11 months ago
# if [ -f $php_fpm_service_file ];then
# systemctl ${action} php${version}-php-fpm
# else
# $serverPath/php/init.d/php${version} ${action}
# fi