ps -ef | grep 程序名| grep -v grep  | wc -l

 

cd $(dirname $0)

source ~/.bash_profile


count=`ps -ef | grep "nginx: master process" | grep -v grep | wc -l`


if [ $count -eq 0 ];then
        /data/openresty/nginx/sbin/nginx
fi

 

posted on 2015-05-06 13:48  凌度  阅读(5418)  评论(0编辑  收藏  举报