diff options
author | Michael Weber <xmw@gentoo.org> | 2016-02-23 21:30:09 +0100 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2016-02-23 21:35:32 +0100 |
commit | 944a94cacf7df1c8179eabcbe6d24640ea06bae1 (patch) | |
tree | 33d631599640dcffef328738aa6b41f4b2077d5a /net-misc/minidlna/files | |
parent | sys-devel/bison: rework info page regen #574492 (diff) | |
download | gentoo-944a94cacf7df1c8179eabcbe6d24640ea06bae1.tar.gz gentoo-944a94cacf7df1c8179eabcbe6d24640ea06bae1.tar.bz2 gentoo-944a94cacf7df1c8179eabcbe6d24640ea06bae1.zip |
net-misc/minidlna: Revbump to new init script (https://github.com/gentoo/gentoo/pull/137, thanks jirutka).
Package-Manager: portage-2.2.27
Diffstat (limited to 'net-misc/minidlna/files')
-rw-r--r-- | net-misc/minidlna/files/minidlna-1.1.5.initd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net-misc/minidlna/files/minidlna-1.1.5.initd b/net-misc/minidlna/files/minidlna-1.1.5.initd new file mode 100644 index 000000000000..c4cb33f0464c --- /dev/null +++ b/net-misc/minidlna/files/minidlna-1.1.5.initd @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +: ${CONFIG:=/etc/minidlna.conf} +: ${M_USER:=minidlna} +: ${M_GROUP:=minidlna} + +name="MiniDLNA" + +pidfile="/run/minidlna/minidlna.pid" +command="/usr/sbin/minidlnad" +command_args="-P $pidfile -f $CONFIG" +start_stop_daemon_args="--user ${M_USER}:${M_GROUP}" + +required_files="$CONFIG" + +depend() { + need net +} + +start_pre() { + if [ "$M_USER" = "root" ]; then + eerror "It's not a good idea to run minidlna as root!" + fi + + if yesno "$RESCAN"; then + command_args="$command_args -R" + fi + + checkpath -q -d -m 0750 -o "${M_USER}:${M_GROUP}" "$(dirname "$pidfile")" +} |