Gentoo Archives: gentoo-commits

From: "Dirkjan Ochtman (djc)" <djc@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-db/couchdb/files: couchdb.init-2
Date: Mon, 31 Oct 2011 14:29:54
Message-Id: 20111031142942.D8EDF2004C@flycatcher.gentoo.org
1 djc 11/10/31 14:29:42
2
3 Added: couchdb.init-2
4 Log:
5 Version bump couchdb to 1.1.1.
6
7 (Portage version: 2.1.10.32/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 dev-db/couchdb/files/couchdb.init-2
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/couchdb/files/couchdb.init-2?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/couchdb/files/couchdb.init-2?rev=1.1&content-type=text/plain
14
15 Index: couchdb.init-2
16 ===================================================================
17 #!/sbin/runscript
18 # Copyright 2008-2011 Dirkjan Ochtman
19 # Distributed under the terms of the GNU General Public License v2
20
21 depend() {
22 need net
23 }
24
25 start() {
26 ebegin "Starting ${SVCNAME}"
27
28 args="-b"
29 if test -n "$COUCHDB_STDOUT_FILE"; then
30 args="$args -o $COUCHDB_STDOUT_FILE"
31 fi
32 if test -n "$COUCHDB_STDERR_FILE"; then
33 args="$args -e $COUCHDB_STDERR_FILE"
34 fi
35 if test -n "$COUCHDB_RESPAWN_TIMEOUT"; then
36 args="$args -r $COUCHDB_RESPAWN_TIMEOUT"
37 fi
38 if test -n "$COUCHDB_OPTIONS"; then
39 args="$args $COUCHDB_OPTIONS"
40 fi
41 if test -n "$COUCHDB_PID_FILE"; then
42 args="$args -p $COUCHDB_PID_FILE"
43 else
44 echo "* ERROR: COUCHDB_PID_FILE must be set"
45 return -1
46 fi
47 if test -z "$COUCHDB_USER"; then
48 echo "* ERROR: COUCHDB_USER must be set"
49 return -1
50 fi
51
52 start-stop-daemon --start --exec ${EXEC} --name ${COUCHDB_BEAM} \
53 --user ${COUCHDB_USER} --pidfile ${COUCHDB_PID_FILE} -- $args
54
55 eend $? "Failed to start ${SVCNAME}"
56 }
57
58 stop() {
59 ebegin "Stopping ${SVCNAME}"
60 start-stop-daemon --stop --exec ${EXEC} --name ${COUCHDB_BEAM} \
61 --pidfile ${COUCHDB_PID_FILE}
62 eend $? "Failed to stop ${SVCNAME}"
63 }