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