2022-07-07 02:22:04 -04:00
|
|
|
#!/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
|
|
|
|
|
|
2023-01-09 01:46:08 -05:00
|
|
|
if [ -f /lib/systemd/system/php${version}-php-fpm.service ];then
|
2023-07-05 10:19:44 -04:00
|
|
|
systemctl ${action} php${version}-php-fpm
|
2023-01-09 01:46:08 -05:00
|
|
|
elif [[ -f /usr/lib/systemd/system/php${version}-php-fpm.service ]]; then
|
2023-07-05 10:19:44 -04:00
|
|
|
systemctl ${action} php${version}-php-fpm
|
2022-07-07 02:22:04 -04:00
|
|
|
else
|
|
|
|
|
$serverPath/php/init.d/php${version} ${action}
|
|
|
|
|
fi
|