/[gentoo-x86]/dev-db/couchdb/files/couchdb.init-2
Gentoo

Contents of /dev-db/couchdb/files/couchdb.init-2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Jun 8 13:00:42 2014 UTC (6 years, 2 months ago) by djc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -0 lines
FILE REMOVED
Remove old, vulnerable versions (bug 506354)

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 30380381)

1 #!/sbin/runscript
2 # Copyright 1999-2013 Dirkjan Ochtman
3 # Distributed under the terms of the Apache License, Version 2.0
4
5 depend() {
6 need net
7 }
8
9 start() {
10 ebegin "Starting ${SVCNAME}"
11
12 args="-b"
13 if test -n "$COUCHDB_STDOUT_FILE"; then
14 args="$args -o $COUCHDB_STDOUT_FILE"
15 fi
16 if test -n "$COUCHDB_STDERR_FILE"; then
17 args="$args -e $COUCHDB_STDERR_FILE"
18 fi
19 if test -n "$COUCHDB_RESPAWN_TIMEOUT"; then
20 args="$args -r $COUCHDB_RESPAWN_TIMEOUT"
21 fi
22 if test -n "$COUCHDB_OPTIONS"; then
23 args="$args $COUCHDB_OPTIONS"
24 fi
25 if test -n "$COUCHDB_PID_FILE"; then
26 args="$args -p $COUCHDB_PID_FILE"
27 else
28 echo "* ERROR: COUCHDB_PID_FILE must be set"
29 return -1
30 fi
31 if test -z "$COUCHDB_USER"; then
32 echo "* ERROR: COUCHDB_USER must be set"
33 return -1
34 fi
35
36 start-stop-daemon --start --exec ${EXEC} --name ${COUCHDB_BEAM} \
37 --user ${COUCHDB_USER} --pidfile ${COUCHDB_PID_FILE} -- $args
38
39 eend $? "Failed to start ${SVCNAME}"
40 }
41
42 stop() {
43 ebegin "Stopping ${SVCNAME}"
44 start-stop-daemon --stop --exec ${EXEC} --name ${COUCHDB_BEAM} \
45 --pidfile ${COUCHDB_PID_FILE}
46 eend $? "Failed to stop ${SVCNAME}"
47 }

  ViewVC Help
Powered by ViewVC 1.1.20