diff options
Diffstat (limited to 'community/mumudvb/mumudvb.initd')
-rw-r--r-- | community/mumudvb/mumudvb.initd | 37 |
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 $? +} + |