Gentoo Archives: gentoo-commits

From: "Michael Weber (xmw)" <xmw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/minidlna/files: minidlna-1.0.23.initd minidlna-1.0.23.confd
Date: Sun, 29 Jan 2012 00:33:37
Message-Id: 20120129003327.55C1F2004C@flycatcher.gentoo.org
1 xmw 12/01/29 00:33:27
2
3 Added: minidlna-1.0.23.initd minidlna-1.0.23.confd
4 Log:
5 Version bump. No longer run as root per default (thanks Yuri Karaban, bug 394373)
6
7 (Portage version: 2.1.10.44/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 net-misc/minidlna/files/minidlna-1.0.23.initd
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/minidlna/files/minidlna-1.0.23.initd?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/minidlna/files/minidlna-1.0.23.initd?rev=1.1&content-type=text/plain
14
15 Index: minidlna-1.0.23.initd
16 ===================================================================
17 #!/sbin/runscript
18 # Copyright 1999-2012 Gentoo Foundation
19 # Distributed under the terms of the GNU General Public License v2
20 # $Header: /var/cvsroot/gentoo-x86/net-misc/minidlna/files/minidlna-1.0.23.initd,v 1.1 2012/01/29 00:33:27 xmw Exp $
21
22 depend() {
23 need net
24 }
25
26 start() {
27 ebegin "Starting MiniDLNA"
28 local params=""
29 local stop=0
30
31 if [[ "${RESCAN}" = "true" || "{$RESCAN}" = yes ]]; then
32 params="$params -R"
33 fi
34
35 #set the config file and check if it exists
36 if [ -z "${CONFIG}" ]; then
37 if [ ! -f "/etc/minidlna.conf" ]; then
38 ewarn "You did not set the config file correctly"
39 stop=1
40 fi
41 params="$params -f /etc/minidlna.conf"
42 else
43 if [ ! -f "${CONFIG}" ]; then
44 ewarn "The specified config file does not exist"
45 stop=1
46 fi
47 params="$params -f ${CONFIG}"
48 fi
49
50
51 if [ $stop -eq 1 ]; then
52 eend 1
53 else
54 start-stop-daemon --start \
55 --user ${M_USER:-nobody} --group ${M_GROUP:-nogroup} \
56 --exec /usr/sbin/minidlna -- ${params}
57 eend $?
58 fi
59 }
60
61 stop() {
62 ebegin "Stopping MiniDLNA"
63 start-stop-daemon --stop --quiet --exec /usr/sbin/minidlna
64 eend $?
65 }
66
67
68
69 1.1 net-misc/minidlna/files/minidlna-1.0.23.confd
70
71 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/minidlna/files/minidlna-1.0.23.confd?rev=1.1&view=markup
72 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/minidlna/files/minidlna-1.0.23.confd?rev=1.1&content-type=text/plain
73
74 Index: minidlna-1.0.23.confd
75 ===================================================================
76 # /etc/conf.d/minidlna
77
78 # Should minidlna rescan the entire collection on startup?
79 # Warning: This may take a long time!
80 RESCAN="false"
81
82 # The location of the config file
83 #CONFIG="/etc/minidlna.conf"
84
85 # Specify the user/group minidlna should run as
86 #M_USER="nobody"
87 #M_GROUP="nogroup"
88
89 # vim: ft=gentoo-conf-d