Update go-fastdfs.tpl

This commit is contained in:
Mr Chen 2019-08-07 17:09:05 +08:00
parent 7861fa7221
commit a4105406fc
1 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
gf_path={$SERVER_PATH}/go-fastdfs
gf_start(){
isStart=`ps -ef| grep -v python|grep -v bash |grep go-fastdfs | grep -v grep|awk '{print $2}'`
isStart=`ps -ef| grep -v python|grep -v bash |grep go-fastdfs |grep -v .jar | grep -v grep|awk '{print $2}'`
if [ "$isStart" == '' ];then
echo -e "Starting go-fastdfs... \c"
cd $gf_path
@ -34,7 +34,7 @@ gf_stop()
{
echo -e "Stopping go-fastdfs... \c"
pids=$(ps -ef| grep -v python |grep -v bash |grep go-fastdfs| grep -v grep | awk '{print $2}')
pids=$(ps -ef| grep -v python |grep -v bash |grep go-fastdfs |grep -v .jar | grep -v grep | awk '{print $2}')
arr=($pids)
for p in ${arr[@]}
@ -46,7 +46,7 @@ gf_stop()
gf_status()
{
isStart=$(ps -ef | grep -v python | grep -v bash | grep go-fastdfs | grep -v grep | awk '{print $2}')
isStart=$(ps -ef | grep -v python | grep -v bash | grep go-fastdfs |grep -v .jar | grep -v grep | awk '{print $2}')
if [ "$isStart" != '' ];then
echo -e "\033[32mgo-fastdfs (pid $(echo $isStart)) already running\033[0m"
else