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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Oct 15 13:40:38 2009 UTC (10 years, 11 months ago) by djc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Remove couchdb version 0.8.1 from the tree.
(Portage version: 2.1.6.13/cvs/Linux x86_64)

1 #!/sbin/runscript
2 # Copyright 2008 Dirkjan Ochtman
3 # Distributed under the terms of the GNU General Public License v2
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 beam \
37 --user ${COUCHDB_USER} --chuid ${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 beam \
45 --pidfile ${COUCHDB_PID_FILE}
46 eend $? "Failed to stop ${SVCNAME}"
47 }

  ViewVC Help
Powered by ViewVC 1.1.20