posts - 535,comments - 60,views - 196万

 

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   凌度  阅读(5426)  评论(0编辑  收藏  举报

点击右上角即可分享
微信分享提示