summaryrefslogtreecommitdiff
path: root/user/mistserver/mistserver.initd
diff options
context:
space:
mode:
Diffstat (limited to 'user/mistserver/mistserver.initd')
-rwxr-xr-xuser/mistserver/mistserver.initd29
1 files changed, 29 insertions, 0 deletions
diff --git a/user/mistserver/mistserver.initd b/user/mistserver/mistserver.initd
new file mode 100755
index 000000000..9f2765c40
--- /dev/null
+++ b/user/mistserver/mistserver.initd
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+
+description="MistServer multimedia streaming service"
+
+: ${MIST_CONFIG:=/etc/mistserver.conf}
+: ${MIST_LOG:=/var/log/mistserver.log}
+
+depend() {
+ need net
+ use logger dns
+ after sshd firewall
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start \
+ --pidfile ${PIDFILE} \
+ --exec MistController \
+ -- -L ${MIST_LOG} -c ${MIST_CONFIG}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop \
+ --pidfile ${PIDFILE} \
+ --exec MistController
+ eend $?
+}