diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/minidlna/files/minidlna-1.1.5.initd |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/minidlna/files/minidlna-1.1.5.initd')
-rw-r--r-- | net-misc/minidlna/files/minidlna-1.1.5.initd | 32 |
1 files changed, 32 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..416f122fa904 --- /dev/null +++ b/net-misc/minidlna/files/minidlna-1.1.5.initd @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +: ${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")" +} |