1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 20:01:56 +00:00
srs/trunk/scripts/stop.sh

34 lines
1.6 KiB
Bash
Raw Normal View History

2013-12-23 02:40:11 +00:00
#!/bin/bash
echo "停止SRS服务器"
ps aux|grep srs|grep "./objs"|grep "demo.conf"
pids=`ps aux|grep srs|grep "./objs"|grep "demo.conf"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
2013-12-23 02:40:11 +00:00
echo "停止SRS转发服务器"
ps aux|grep srs|grep "./objs"|grep "demo.19350.conf"
pids=`ps aux|grep srs|grep "./objs"|grep "demo.19350.conf"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
2013-12-23 02:40:11 +00:00
# step 4(optinal): start nginx for HLS
echo "停止NGINXHLS服务"
ps aux|grep nginx|grep process
2013-12-27 02:11:29 +00:00
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
2013-12-23 02:40:11 +00:00
# step 5(optinal): start http hooks for srs callback
echo "停止API服务器"
ps aux|grep python|grep research|grep "api-server"
pids=`ps aux|grep python|grep research|grep "api-server"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
# step 6: publish demo live stream
echo "停止FFMPEG推送demo流(播放器上12路演示)"
ps aux|grep scripts|grep "ffmpeg.demo.sh"
2014-03-10 11:26:44 +00:00
pids=`ps aux|grep scripts|grep "/_ffmpeg.demo.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
2013-12-23 02:40:11 +00:00
# step 7: publish players live stream
echo "停止FFMPEG推送players流(播放器上演示用)"
ps aux|grep scripts|grep "ffmpeg.players.sh"
2014-03-10 11:26:44 +00:00
pids=`ps aux|grep scripts|grep "/_ffmpeg.players.sh"|awk '{print $2}'`; for pid in $pids; do echo "结束现有进程:$pid"; kill -s SIGKILL $pid; done
2013-12-23 02:40:11 +00:00
echo "SRS系统服务均已停止"