diff options
Diffstat (limited to 'testing/crtmpserver/crtmpserver.initd')
-rw-r--r-- | testing/crtmpserver/crtmpserver.initd | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/testing/crtmpserver/crtmpserver.initd b/testing/crtmpserver/crtmpserver.initd index aa967b3d9..656eb4029 100644 --- a/testing/crtmpserver/crtmpserver.initd +++ b/testing/crtmpserver/crtmpserver.initd @@ -9,11 +9,22 @@ depend() need net } +checkconfig() { + if [ ! -e /etc/crtmpserver/crtmpserver.lua ] ; then + eerror "You need to create /etc/crtmpserver/crtmpserver.lua first." + eerror "An example can be found in /etc/crtmpserver/crtmpserver.lua.sample" + return 1 + fi +} + + + start() { + checkconfig || return 1 ebegin "Starting C++ RTMP Server" - start-stop-daemon --start --quit \ - --exec /usr/sbin/crtmpserver --daemon --uid=${RTMPD_USER} --pid=/var/run/crtmpserver.pid ${CONFFILE} + start-stop-daemon --start --quiet --exec /usr/sbin/crtmpserver \ + -- --daemon --uid=${RTMPD_USER} --pid=/var/run/crtmpserver.pid ${CONFFILE} eend ${?} } @@ -24,3 +35,4 @@ stop() --exec /usr/sbin/crtmpserver --pid=/var/run/crtmpserver.pid eend ${?} } + |