update the stop/start script

pull/133/head
winlin
parent 51686b91d2
commit 6bba081485

@ -4,7 +4,9 @@ if [[ ! -d $src_dir ]]; then echo "错误必须在src同目录执行脚本";
cmd="sudo ./objs/nginx/sbin/nginx"
echo "启动NGINXHLS服务$cmd"
pids=`ps aux|grep nginx|grep process|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; sudo kill -s SIGKILL $pid; done
if [[ -f ./objs/nginx/logs/nginx.pid ]]; then
pids=`cat ./objs/nginx/logs/nginx.pid`; for pid in $pids; do echo "结束现有进程:$pid"; sudo kill -s SIGTERM $pid; done
fi
sudo ./objs/nginx/sbin/nginx
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误启动NGINXHLS服务失败"; exit $ret; fi

@ -11,7 +11,9 @@ pids=`ps aux|grep srs|grep "./objs"|grep "srs.19350.conf"|awk '{print $2}'`; for
# step 4(optinal): start nginx for HLS
echo "停止NGINXHLS服务"
ps aux|grep nginx|grep process
pids=`ps aux|grep nginx|grep process|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; sudo kill -s SIGKILL $pid; done
if [[ -f ./objs/nginx/logs/nginx.pid ]]; then
pids=`cat ./objs/nginx/logs/nginx.pid`; for pid in $pids; do echo "结束现有进程:$pid"; sudo kill -s SIGTERM $pid; done
fi
# step 5(optinal): start http hooks for srs callback
echo "停止API服务器"

Loading…
Cancel
Save