mirror of https://github.com/midoks/mdserver-web
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.
22 lines
445 B
22 lines
445 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")
|
||
|
rootPath=$(dirname "$rootPath")
|
||
|
serverPath=$(dirname "$rootPath")
|
||
|
|
||
|
|
||
|
action=$1
|
||
|
version=$2
|
||
|
|
||
|
|
||
|
if [ -f /lib/systemd/system/php${version}.service ];then
|
||
|
systemctl ${action} php${version}
|
||
|
else
|
||
|
$serverPath/php/init.d/php${version} ${action}
|
||
|
fi
|