aboutsummaryrefslogtreecommitdiffstats
path: root/community/mumudvb/mumudvb.initd
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-10-14 06:34:32 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-10-14 06:34:36 +0000
commit48a358e409e0382ae2ce645f096468e8edcdab8a (patch)
tree7cb6ea83a5fff4814dbbbf7f77d3116ff25c7aa4 /community/mumudvb/mumudvb.initd
parent2814025d57cdf8cbd676242f64190823174e13d1 (diff)
downloadaports-48a358e409e0382ae2ce645f096468e8edcdab8a.tar.bz2
aports-48a358e409e0382ae2ce645f096468e8edcdab8a.tar.xz
community/mumudvb: moved from testing
Diffstat (limited to 'community/mumudvb/mumudvb.initd')
-rw-r--r--community/mumudvb/mumudvb.initd37
1 files changed, 37 insertions, 0 deletions
diff --git a/community/mumudvb/mumudvb.initd b/community/mumudvb/mumudvb.initd
new file mode 100644
index 0000000000..95f88a10dc
--- /dev/null
+++ b/community/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 $?
+}
+