summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/default/couchdb.tpl.in3
-rw-r--r--etc/init/couchdb.tpl.in17
2 files changed, 6 insertions, 14 deletions
diff --git a/etc/default/couchdb.tpl.in b/etc/default/couchdb.tpl.in
index 40498d56..c2a3f2ae 100644
--- a/etc/default/couchdb.tpl.in
+++ b/etc/default/couchdb.tpl.in
@@ -1,8 +1,7 @@
# Sourced by init script for configuration.
COUCHDB_USER=couchdb
-COUCHDB_INI_FILE=%localconfdir%/couch.ini
-COUCHDB_PID_FILE=%localstatedir%/run/couchdb.pid
COUCHDB_STDOUT_FILE=/dev/null
COUCHDB_STDERR_FILE=/dev/null
COUCHDB_RESPAWN_TIMEOUT=5
+COUCHDB_OPTIONS=
diff --git a/etc/init/couchdb.tpl.in b/etc/init/couchdb.tpl.in
index df91167f..b25c8685 100644
--- a/etc/init/couchdb.tpl.in
+++ b/etc/init/couchdb.tpl.in
@@ -63,12 +63,6 @@ start_couchdb () {
# Start Apache CouchDB as a background process.
command="$COUCHDB -b"
- if test -n "$COUCHDB_INI_FILE"; then
- command="$command -c $COUCHDB_INI_FILE"
- fi
- if test -n "$COUCHDB_PID_FILE"; then
- command="$command -p $COUCHDB_PID_FILE"
- fi
if test -n "$COUCHDB_STDOUT_FILE"; then
command="$command -o $COUCHDB_STDOUT_FILE"
fi
@@ -78,11 +72,10 @@ start_couchdb () {
if test -n "$COUCHDB_RESPAWN_TIMEOUT"; then
command="$command -r $COUCHDB_RESPAWN_TIMEOUT"
fi
+ if test -n "$COUCHDB_OPTIONS"; then
+ command="$command $COUCHDB_OPTIONS"
+ fi
if test -n "$COUCHDB_USER"; then
- if test -n "$COUCHDB_PID_FILE"; then
- touch $COUCHDB_PID_FILE
- chown $COUCHDB_USER $COUCHDB_PID_FILE
- fi
if su $COUCHDB_USER -c "$command" > /dev/null; then
return $SCRIPT_OK
else
@@ -101,8 +94,8 @@ stop_couchdb () {
# Stop the running Apache CouchDB process.
command="$COUCHDB -d"
- if test -n "$COUCHDB_PID_FILE"; then
- command="$command -p $COUCHDB_PID_FILE"
+ if test -n "$COUCHDB_OPTIONS"; then
+ command="$command $COUCHDB_OPTIONS"
fi
if test -n "$COUCHDB_USER"; then
if su $COUCHDB_USER -c "$command" > /dev/null; then