mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
update the stop/start script
This commit is contained in:
parent
51686b91d2
commit
6bba081485
2 changed files with 6 additions and 2 deletions
|
@ -4,7 +4,9 @@ if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本";
|
||||||
|
|
||||||
cmd="sudo ./objs/nginx/sbin/nginx"
|
cmd="sudo ./objs/nginx/sbin/nginx"
|
||||||
echo "启动NGINX(HLS服务):$cmd"
|
echo "启动NGINX(HLS服务):$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
|
sudo ./objs/nginx/sbin/nginx
|
||||||
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动NGINX(HLS服务)失败"; exit $ret; fi
|
ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动NGINX(HLS服务)失败"; 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
|
# step 4(optinal): start nginx for HLS
|
||||||
echo "停止NGINX(HLS服务)"
|
echo "停止NGINX(HLS服务)"
|
||||||
ps aux|grep nginx|grep process
|
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
|
# step 5(optinal): start http hooks for srs callback
|
||||||
echo "停止API服务器"
|
echo "停止API服务器"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue