Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2013-12-27 10:11:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6bba08148570d870f48edcfecab67e34f81fd6cd
6bba0814
1 parent
51686b91
update the stop/start script
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
6 行增加
和
2 行删除
trunk/scripts/_step.start.nginx.sh
trunk/scripts/stop.sh
trunk/scripts/_step.start.nginx.sh
查看文件 @
6bba081
...
...
@@ -4,7 +4,9 @@ if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本";
cmd
=
"sudo ./objs/nginx/sbin/nginx"
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
ret
=
$?
;
if
[[
0 -ne
$ret
]]
;
then
echo
"错误:启动NGINX(HLS服务)失败"
;
exit
$ret
;
fi
...
...
trunk/scripts/stop.sh
查看文件 @
6bba081
...
...
@@ -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
"停止NGINX(HLS服务)"
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服务器"
...
...
请
注册
或
登录
后发表评论