设置启动进程

来源:互联网 发布:数据有效性wps2016 编辑:程序博客网 时间:2024/06/05 23:56

#!/bin/sh

#ps -fe|grep "Send_newsAction.php\|Send_msgAction.php\|Send_wxa_tplAction.php" | wc -l

if [ $(ps -fe|grep "Send_newsAction.php\|Send_msgAction.php\|Send_wxa_tplAction.php" | wc -l) -lt 2 ];

then

echo "start process....."

else

echo "running....."

fi

#####


#ps -fe|grep 'Send_newsAction.php\|Send_msgAction.php\|Send_wxa_tplAction.php' |grep -v grep