Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-sound/murmur/files: murmur.confd murmur.initd
Date: Mon, 31 Dec 2012 09:52:53
Message-Id: 20121231095243.EE87A2171E@flycatcher.gentoo.org
1 polynomial-c 12/12/31 09:52:43
2
3 Modified: murmur.confd murmur.initd
4 Log:
5 Added rewritten init script so running murmurd won't be seen as crashed by openrc anymore. Removed pidfile variable from conf.d file
6
7 (Portage version: 2.2.0_alpha149/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 0x981CA6FC)
8
9 Revision Changes Path
10 1.3 media-sound/murmur/files/murmur.confd
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/murmur/files/murmur.confd?rev=1.3&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/murmur/files/murmur.confd?rev=1.3&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/murmur/files/murmur.confd?r1=1.2&r2=1.3
15
16 Index: murmur.confd
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/media-sound/murmur/files/murmur.confd,v
19 retrieving revision 1.2
20 retrieving revision 1.3
21 diff -u -r1.2 -r1.3
22 --- murmur.confd 16 Oct 2008 22:42:35 -0000 1.2
23 +++ murmur.confd 31 Dec 2012 09:52:43 -0000 1.3
24 @@ -1,9 +1,6 @@
25 # where to look for the config file
26 MURMUR_CONF=/etc/murmur/murmur.ini
27
28 -# where to look for the pid file
29 -MURMUR_PID=/var/run/murmur/murmur.pid
30 -
31 # run as this user
32 MURMUR_USER=murmur
33
34
35
36
37 1.4 media-sound/murmur/files/murmur.initd
38
39 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/murmur/files/murmur.initd?rev=1.4&view=markup
40 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/murmur/files/murmur.initd?rev=1.4&content-type=text/plain
41 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/murmur/files/murmur.initd?r1=1.3&r2=1.4
42
43 Index: murmur.initd
44 ===================================================================
45 RCS file: /var/cvsroot/gentoo-x86/media-sound/murmur/files/murmur.initd,v
46 retrieving revision 1.3
47 retrieving revision 1.4
48 diff -u -r1.3 -r1.4
49 --- murmur.initd 15 Sep 2011 21:42:38 -0000 1.3
50 +++ murmur.initd 31 Dec 2012 09:52:43 -0000 1.4
51 @@ -1,5 +1,9 @@
52 #!/sbin/runscript
53
54 +pidfile="/var/run/murmur/murmur.pid"
55 +command="/usr/bin/murmurd"
56 +command_args="-ini \"${MURMUR_CONF}\""
57 +start_stop_daemon_args="-u \"${MURMUR_USER}\" --env HOME=\"${MURMUR_HOME}\" --wait 20"
58 extra_started_commands="reload"
59
60 depend() {
61 @@ -8,29 +12,18 @@
62 after bootmisc mysql
63 }
64
65 -start() {
66 - ebegin "Starting Murmur"
67 - start-stop-daemon --start --pidfile "${MURMUR_PID}" \
68 - --user "${MURMUR_USER}" --env HOME="${MURMUR_HOME}" \
69 - --exec /usr/bin/murmurd -- -ini "${MURMUR_CONF}"
70 - eend $?
71 -}
72 -
73 -stop() {
74 - ebegin "Stopping Murmur"
75 - start-stop-daemon --stop --pidfile "${MURMUR_PID}" \
76 - --exec /usr/bin/murmurd
77 - eend $?
78 +start_pre() {
79 + checkpath -d -o ${MURMUR_USER} ${pidfile%/*}
80 }
81
82 reload() {
83 - if [ ! -f "${MURMUR_PID}" ]; then
84 + if [ ! -f "${pidfile}" ]; then
85 eerror "Murmur is not running"
86 return 1
87 fi
88 ebegin "Reloading Murmur"
89 - start-stop-daemon --signal HUP --pidfile "${MURMUR_PID}" \
90 - --exec /usr/bin/murmurd
91 + start-stop-daemon --signal HUP --pidfile "${pidfile}" \
92 + --exec ${command}
93 eend $?
94 }