Gentoo Archives: gentoo-commits

From: "Patrick McLean (chutzpah)" <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-admin/conserver/files: conserver.initd-r1
Date: Fri, 27 Jun 2014 23:10:57
Message-Id: 20140627231043.5619A2004F@flycatcher.gentoo.org
1 chutzpah 14/06/27 23:10:43
2
3 Added: conserver.initd-r1
4 Log:
5 Revision bump, in the init script, make start handle the pidfile as well as stop
6
7 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xE3F69979BB4B8928DA78E3D17CBF44EF)
8
9 Revision Changes Path
10 1.1 app-admin/conserver/files/conserver.initd-r1
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/conserver/files/conserver.initd-r1?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/conserver/files/conserver.initd-r1?rev=1.1&content-type=text/plain
14
15 Index: conserver.initd-r1
16 ===================================================================
17 #!/sbin/runscript
18 # Copyright 1999-2014 Gentoo Foundation
19 # Distributed under the terms of the GNU General Public License v2
20 # $Header: /var/cvsroot/gentoo-x86/app-admin/conserver/files/conserver.initd-r1,v 1.1 2014/06/27 23:10:43 chutzpah Exp $
21
22 depend() {
23 need clock
24 }
25
26 checkconfig() {
27 if [ ! -e /etc/conserver/conserver.cf ] ; then
28 eerror "You need to create /etc/conserver/conserver.cf first."
29 eerror "A sample is placed there to be renamed and ajusted."
30 eerror "Read the man page or see /usr/share/doc/conserver-<version>/."
31 return 1
32 fi
33
34 if [ ! -e /etc/conserver/conserver.passwd ] ; then
35 eerror "You need to create /etc/conserver/conserver.passwd first."
36 eerror "A sample is placed there to be renamed and ajusted."
37 eerror "Read the man page or see /usr/share/doc/conserver-<version>/."
38 return 1
39 fi
40 }
41
42 start() {
43 checkconfig || return 1
44 ebegin "Starting conserver"
45 start-stop-daemon --start --quiet --pidfile /var/run/conserver.pid --exec \
46 /usr/sbin/conserver -- ${CONSERVER_OPTS} 1>/dev/null
47 eend $? "Failed to start conserver"
48 }
49
50 stop() {
51 ebegin "Stopping conserver"
52 start-stop-daemon --stop --quiet --pidfile /var/run/conserver.pid
53 eend $? "Failed to stop conserver"
54 }