aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mumudvb/mumudvb.initd
diff options
context:
space:
mode:
Diffstat (limited to 'testing/mumudvb/mumudvb.initd')
-rw-r--r--testing/mumudvb/mumudvb.initd37
1 files changed, 37 insertions, 0 deletions
diff --git a/testing/mumudvb/mumudvb.initd b/testing/mumudvb/mumudvb.initd
new file mode 100644
index 00000000000..95f88a10dce
--- /dev/null
+++ b/testing/mumudvb/mumudvb.initd
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+
+name="MuMuDVB"
+command="/usr/bin/mumudvb"
+command_background="true"
+pidfile="/var/run/mumudvb/mumudvb.pid"
+daemonuser="mumudvb"
+
+checkconfig() {
+ if [ ! -f "$CONFIG_FILE" ] ; then
+ eerror "You need to setup $CONFIG_FILE first. Install $pkgname-doc for examples"
+ return 1
+ fi
+}
+
+
+depend() {
+ need net
+ after firewall
+}
+
+start () {
+ checkconfig || return 1
+ ebegin "Starting $name"
+ start-stop-daemon --start --name mumudvb_$ADAPTER \
+ --make-pidfile --pidfile $pidfile \
+ --user $daemonuser --exec $command -- $COMMAND_ARGS --card $ADAPTER -c $CONFIG_FILE
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping $name"
+ start-stop-daemon --stop --pidfile $pidfile \
+ --exec $command
+ eend $?
+}
+