diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2009-08-30 17:56:56 +0000 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2009-08-30 17:56:56 +0000 |
commit | 6c5a22e7afd7530148f3eef6d4722cd725f28851 (patch) | |
tree | 80862f0920c1f7cb55e7279fd5acfbc27286194a /bin | |
parent | 422d815b3baf1a0152429d02257aeaeaf6fa471c (diff) |
refactor CouchDB startup procedure, see COUCHDB-216 for details
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@809392 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'bin')
-rw-r--r-- | bin/couchdb.bat.tpl.in | 6 | ||||
-rw-r--r-- | bin/couchdb.tpl.in | 22 |
2 files changed, 5 insertions, 23 deletions
diff --git a/bin/couchdb.bat.tpl.in b/bin/couchdb.bat.tpl.in index 6c1f3aed..9be38137 100644 --- a/bin/couchdb.bat.tpl.in +++ b/bin/couchdb.bat.tpl.in @@ -19,8 +19,4 @@ rem Allow a different erlang executable (eg, werl) to be used. if "%ERL%x" == "x" set ERL=erl.exe echo CouchDB %version% - prepare to relax... -%ERL% -smp auto -sasl errlog_type error ^ - -eval "application:load(crypto)" ^ - -eval "application:load(couch)" ^ - -eval "crypto:start()" ^ - -eval "couch_server:start([""../etc/couchdb/default.ini"", ""../etc/couchdb/local.ini""]), receive done -> done end." +%ERL% -sasl errlog_type error -s couch diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in index 6f22495c..14f989a6 100644 --- a/bin/couchdb.tpl.in +++ b/bin/couchdb.tpl.in @@ -106,9 +106,6 @@ _get_pid () { } _add_config_file () { - if test -n "$start_arguments"; then - start_arguments="$start_arguments, "; - fi if test -z "$print_arguments"; then print_arguments="$1" else @@ -118,12 +115,12 @@ $1 EOF `" fi - start_arguments="$start_arguments \\\"$1\\\"" + start_arguments="$start_arguments $1" background_start_arguments="$background_start_arguments -a \\\"$1\\\"" } _add_config_dir () { - for file in `find "$1" -mindepth 1 -maxdepth 1 -type f`; do + for file in `find "$1" -mindepth 1 -maxdepth 1 -type f -name *.ini`; do _add_config_file $file done } @@ -214,19 +211,8 @@ start_couchdb () { touch $PID_FILE interactive_option="+Bd -noinput" fi - command="`%ICU_CONFIG% --invoke` \ - %ERL% $interactive_option -smp auto -sasl errlog_type error +K true \ - -pa %localerlanglibdir%/%couchdbebindir% \ - %localerlanglibdir%/%mochiwebebindir% \ - %localerlanglibdir%/%ibrowseebindir% \ - %localerlanglibdir%/%oauthebindir% \ - -eval \"application:load(ibrowse)\" \ - -eval \"application:load(oauth)\" \ - -eval \"application:load(crypto)\" \ - -eval \"application:load(couch)\" \ - -eval \"crypto:start()\" \ - -eval \"ibrowse:start()\" \ - -eval \"couch_server:start([$start_arguments]), receive done -> done end.\" " + command="%ERL% $interactive_option -sasl errlog_type error +K true \ + -env ERL_LIBS %localerlanglibdir% -couch_ini $start_arguments -s couch" if test "$BACKGROUND" = "true" -a "$RECURSED" = "false"; then $0 $background_start_arguments -b -r $RESPAWN_TIMEOUT -p $PID_FILE \ -o $STDOUT_FILE -e $STDERR_FILE -R & |