1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

support daemon

This commit is contained in:
winlin 2014-03-23 12:42:05 +08:00
parent 2c1354b9b9
commit 3ec3c1f532
5 changed files with 102 additions and 29 deletions

View file

@ -71,11 +71,10 @@ start() {
srs_log_file=`cat ${ROOT}/${CONFIG} |grep '^srs_log_file'| awk '{print $2}'| awk -F ';' '{print $1}'`
# TODO: FIXME: set limit by, for instance, "ulimit -HSn 10000"
# TODO: FIXME: support deamon, without nohup.
if [[ -z $srs_log_file ]]; then
(cd ${ROOT}; nohup ${APP} -c ${CONFIG} >/dev/null 2>&1 &)
(cd ${ROOT}; ${APP} -c ${CONFIG} >/dev/null 2>&1)
else
(cd ${ROOT}; nohup ${APP} -c ${CONFIG} >> $srs_log_file 2>&1 &)
(cd ${ROOT}; ${APP} -c ${CONFIG} >> $srs_log_file 2>&1)
fi
# check again after start server