mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine buils nginx script
This commit is contained in:
parent
421fbd4c3e
commit
77e652fcbe
1 changed files with 62 additions and 66 deletions
|
@ -272,8 +272,7 @@ function write_nginx_html5()
|
||||||
END
|
END
|
||||||
}
|
}
|
||||||
__SRS_BUILD_NGINX=NO; if [ $SRS_ARM_UBUNTU12 = NO ]; then if [ $SRS_HLS = YES ]; then __SRS_BUILD_NGINX=YES; fi fi
|
__SRS_BUILD_NGINX=NO; if [ $SRS_ARM_UBUNTU12 = NO ]; then if [ $SRS_HLS = YES ]; then __SRS_BUILD_NGINX=YES; fi fi
|
||||||
if [ $SRS_ARM_UBUNTU12 = NO ]; then
|
if [ $__SRS_BUILD_NGINX = YES ]; then
|
||||||
if [ $SRS_HLS = YES ]; then
|
|
||||||
if [[ -f ${SRS_OBJS}/nginx/sbin/nginx ]]; then
|
if [[ -f ${SRS_OBJS}/nginx/sbin/nginx ]]; then
|
||||||
echo "nginx-1.5.7 is ok.";
|
echo "nginx-1.5.7 is ok.";
|
||||||
else
|
else
|
||||||
|
@ -315,7 +314,6 @@ if [ $SRS_ARM_UBUNTU12 = NO ]; then
|
||||||
|
|
||||||
# nginx.html to detect whether nginx is alive
|
# nginx.html to detect whether nginx is alive
|
||||||
echo "nginx is ok" > ${SRS_OBJS}/nginx/html/nginx.html
|
echo "nginx is ok" > ${SRS_OBJS}/nginx/html/nginx.html
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $SRS_HLS = YES ]; then
|
if [ $SRS_HLS = YES ]; then
|
||||||
|
@ -364,8 +362,7 @@ ln -sf `pwd`/${SRS_OBJS}/nginx/html/forward research/api-server/static-dir/forwa
|
||||||
|
|
||||||
# only when the nginx is ok,
|
# only when the nginx is ok,
|
||||||
# if api-server not enalbed, use nginx as demo.
|
# if api-server not enalbed, use nginx as demo.
|
||||||
if [ $SRS_ARM_UBUNTU12 = NO ]; then
|
if [ $__SRS_BUILD_NGINX = YES ]; then
|
||||||
if [ $SRS_HLS = YES ]; then
|
|
||||||
if [ $SRS_HTTP_CALLBACK = YES ]; then
|
if [ $SRS_HTTP_CALLBACK = YES ]; then
|
||||||
# override the default index.
|
# override the default index.
|
||||||
rm -f ${SRS_OBJS}/nginx/html/index.html &&
|
rm -f ${SRS_OBJS}/nginx/html/index.html &&
|
||||||
|
@ -373,22 +370,21 @@ if [ $SRS_ARM_UBUNTU12 = NO ]; then
|
||||||
else
|
else
|
||||||
rm -f ${SRS_OBJS}/nginx/html/index.html &&
|
rm -f ${SRS_OBJS}/nginx/html/index.html &&
|
||||||
cat<<END >> ${SRS_OBJS}/nginx/html/index.html
|
cat<<END >> ${SRS_OBJS}/nginx/html/index.html
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>SRS</title>
|
<title>SRS</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
window.location.href = "players/index.html" + window.location.search;
|
window.location.href = "players/index.html" + window.location.search;
|
||||||
}, 500);
|
}, 500);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
END
|
END
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue