winlin

donot start nginx for demo, use cherrypy to delivery HLS.

@@ -3,8 +3,9 @@ src_dir='src' @@ -3,8 +3,9 @@ src_dir='src'
3 if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi 3 if [[ ! -d $src_dir ]]; then echo "错误:必须在src同目录执行脚本"; exit 1; fi
4 4
5 # step 1: build srs 5 # step 1: build srs
  6 +# nginx is not needed, we use cherrypy to delivery hls.
6 echo "编译SRS" 7 echo "编译SRS"
7 -./configure --x86-x64 --with-nginx && make 8 +./configure --x86-x64 && make
8 ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:编译SRS失败"; exit $ret; fi 9 ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:编译SRS失败"; exit $ret; fi
9 10
10 echo "编译SRS成功" 11 echo "编译SRS成功"
@@ -8,9 +8,6 @@ GREEN="\\e[32m" @@ -8,9 +8,6 @@ GREEN="\\e[32m"
8 YELLOW="\\e[33m" 8 YELLOW="\\e[33m"
9 BLACK="\\e[0m" 9 BLACK="\\e[0m"
10 10
11 -sudo ./objs/nginx/sbin/nginx  
12 -echo "启动nginx"  
13 -  
14 ./etc/init.d/srs-demo restart; ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动SRS失败"; exit $ret; fi 11 ./etc/init.d/srs-demo restart; ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:启动SRS失败"; exit $ret; fi
15 echo "启动SRS服务器成功" 12 echo "启动SRS服务器成功"
16 13
1 #!/bin/bash 1 #!/bin/bash
2 2
3 -sudo ./objs/nginx/sbin/nginx -s stop  
4 -echo "停止nginx"  
5 -  
6 ./etc/init.d/srs-demo stop; ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:停止SRS失败"; exit $ret; fi 3 ./etc/init.d/srs-demo stop; ret=$?; if [[ 0 -ne $ret ]]; then echo "错误:停止SRS失败"; exit $ret; fi
7 echo "停止SRS服务器成功" 4 echo "停止SRS服务器成功"
8 5