summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/couchdb.bat.tpl.in6
-rw-r--r--bin/couchdb.tpl.in21
2 files changed, 20 insertions, 7 deletions
diff --git a/bin/couchdb.bat.tpl.in b/bin/couchdb.bat.tpl.in
index 2f16b2a7..48d78513 100644
--- a/bin/couchdb.bat.tpl.in
+++ b/bin/couchdb.bat.tpl.in
@@ -17,8 +17,10 @@ rem First change to the drive with the erlang bin directory
rem then change to the erlang bin directory
cd %~dp0
-rem Allow a different erlang executable (eg, werl) to be used.
-if "%ERL%x" == "x" set ERL=erl.exe
+rem Allow a different erlang executable (eg, erl) to be used.
+rem When using erl instead of werl, server restarts during test runs can fail
+rem intermittently. But using erl should be fine for production use.
+if "%ERL%x" == "x" set ERL=werl.exe
echo CouchDB %version% - prepare to relax...
%ERL% -sasl errlog_type error -s couch
diff --git a/bin/couchdb.tpl.in b/bin/couchdb.tpl.in
index bdea97fe..94d47439 100644
--- a/bin/couchdb.tpl.in
+++ b/bin/couchdb.tpl.in
@@ -15,6 +15,7 @@
BACKGROUND=false
DEFAULT_CONFIG_DIR=%localconfdir%/default.d
DEFAULT_CONFIG_FILE=%localconfdir%/%defaultini%
+ERL_START_OPTIONS="-sasl errlog_type error +K true +A 4"
HEART_BEAT_TIMEOUT=11
HEART_COMMAND="%bindir%/%couchdb_command_name% -k"
INTERACTIVE=false
@@ -61,11 +62,19 @@ Usage: $basename [OPTION]
The $basename command runs the %package_name% server.
+Erlang is called with:
+
+ $ERL_START_OPTIONS
+
Erlang inherits the environment of this command.
-The exit status is 0 for success or 1 for failure.
+You can override these options using the environment:
+
+ ERL_AFLAGS, ERL_FLAGS, ERL_ZFLAGS
-The \`-s' option will exit 0 for running and 1 for not running.
+See erl(1) for more information about the environment variables.
+
+The exit status is 0 for success or 1 for failure.
Options:
@@ -120,8 +129,10 @@ EOF
}
_add_config_dir () {
- for file in `find "$1" -mindepth 1 -maxdepth 1 -type f -name '*.ini'`; do
- _add_config_file $file
+ for file in "$1"/*.ini; do
+ if [ -r "$file" ]; then
+ _add_config_file "$file"
+ fi
done
}
@@ -211,7 +222,7 @@ start_couchdb () {
touch $PID_FILE
interactive_option="+Bd -noinput"
fi
- command="%ERL% $interactive_option -sasl errlog_type error +K true \
+ command="%ERL% $interactive_option $ERL_START_OPTIONS \
-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 \