aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mumudvb/mumudvb.initd
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-10-06 09:18:18 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-10-06 09:27:10 +0000
commite76997c61a4ea29ccbadc0adc5bd20349d63ef47 (patch)
tree66d38360e4fd904245674db194393941c2d1b24f /testing/mumudvb/mumudvb.initd
parent137f72ab60c8b8879ab9dab4d7bbec9859e5f9b5 (diff)
downloadaports-e76997c61a4ea29ccbadc0adc5bd20349d63ef47.tar.bz2
aports-e76997c61a4ea29ccbadc0adc5bd20349d63ef47.tar.xz
testing/mumudvb: new aport. Fixes #6269
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 0000000000..95f88a10dc
--- /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 $?
+}
+