Skip to content

Commit

Permalink
added -C option to couchdb script, thanks Eric Casteleijn
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@749321 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Noah Slater committed Mar 2, 2009
1 parent 0c19800 commit fbaff7b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions THANKS
Expand Up @@ -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.
11 changes: 9 additions & 2 deletions bin/couchdb.tpl.in
Expand Up @@ -20,6 +20,7 @@ BACKGROUND_BOOLEAN=false
KILL_BOOLEAN=false
SHUTDOWN_BOOLEAN=false
RECURSED_BOOLEAN=false
RESET_CONFIG_BOOLEAN=true

RESPAWN_TIMEOUT=0

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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;;
Expand Down

0 comments on commit fbaff7b

Please sign in to comment.