summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Slater <nslater@apache.org>2009-03-02 14:50:15 +0000
committerNoah Slater <nslater@apache.org>2009-03-02 14:50:15 +0000
commitfbaff7b12e430d4305df20439ddf317062d7ac55 (patch)
tree47b31e8bac5ddaaad814ef08c6d121b4eb54d919
parent0c198005f6a84d948e11354912bb6178f3f852eb (diff)
added -C option to couchdb script, thanks Eric Casteleijn
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@749321 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--THANKS1
-rw-r--r--bin/couchdb.tpl.in11
2 files changed, 10 insertions, 2 deletions
diff --git a/THANKS b/THANKS
index a9b66ba9..6f893262 100644
--- a/THANKS
+++ b/THANKS
@@ -26,5 +26,6 @@ Some of these people are:
* Brian Palmer <jira@brian.codekitchen.net>
* Jason Davies <jason@jasondavies.com>
* Maximillian Dornseif <md@hudora.de>
+ * Eric Casteleijn <eric.casteleijn@canonical.com>
For a list of authors see the `AUTHORS` file.
diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in
index 4959654a..709912c7 100644
--- a/bin/couchdb.tpl.in
+++ b/bin/couchdb.tpl.in
@@ -20,6 +20,7 @@ BACKGROUND_BOOLEAN=false
KILL_BOOLEAN=false
SHUTDOWN_BOOLEAN=false
RECURSED_BOOLEAN=false
+RESET_CONFIG_BOOLEAN=true
RESPAWN_TIMEOUT=0
@@ -70,6 +71,7 @@ Options:
-h display a short help message and exit
-V display version information and exit
-c FILE use configuration FILE (chainable, resets system default)
+ -C FILE use configuration FILE (chainable, does not reset system default)
-i use the interactive Erlang shell
-b spawn as a background process
-p FILE set the background PID FILE (overrides system default)
@@ -168,7 +170,11 @@ start_couchdb () {
interactive_option="+Bd -noinput"
fi
if test -n "$INI_FILES"; then
- ini_files="$INI_FILES"
+ if test "$RESET_CONFIG_BOOLEAN" = "true"; then
+ ini_files="$INI_FILES"
+ else
+ ini_files="$DEFAULT_INI_FILE $INI_FILES"
+ fi
else
ini_files="$DEFAULT_INI_FILE $LOCAL_INI_FILE"
fi
@@ -258,7 +264,7 @@ stop_couchdb () {
parse_script_option_list () {
set +e
- options=`getopt hVc:ibp:r:Ro:e:skd $@`
+ options=`getopt hVc:C:ibp:r:Ro:e:skd $@`
if test ! $? -eq 0; then
display_error
fi
@@ -269,6 +275,7 @@ parse_script_option_list () {
-h) shift; display_help; exit $SCRIPT_OK;;
-V) shift; display_version; exit $SCRIPT_OK;;
-c) shift; INI_FILES="$INI_FILES $1"; shift;;
+ -C) shift; RESET_CONFIG_BOOLEAN=false; INI_FILES="$INI_FILES $1"; shift;;
-i) shift; INTERACTIVE_BOOLEAN=true;;
-b) shift; BACKGROUND_BOOLEAN=true;;
-r) shift; RESPAWN_TIMEOUT=$1; shift;;