This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/master by this push:
new 98c4745 Allow override of `-couch_ini` parameter
98c4745 is described below
commit 98c474598cef1e90b0892e53be1ce324959a13f8
Author: Adrien Vergé <[email protected]>
AuthorDate: Fri Nov 1 15:40:53 2019 +0100
Allow override of `-couch_ini` parameter
This is the continuation of commit 649b808 "Allow override of
`-args_file` and `-config` parameters (#1095)".
This allows setting the `-couch_ini` files location if needed, using
`COUCHDB_INI_FILES` env var:
- If unset (the default), `-couch_ini` argument won't be passed.
- If set (to a file, or list of files like
`COUCHDB_INI_FILES=/chroot/etc/couchdb/default.ini
/chroot/etc/couchdb/default.d ...`) it will allow running CouchDB with
different settings. A useful case is being able to run multiple
CouchDB servers on the same machine.
---
rel/files/couchdb.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rel/files/couchdb.in b/rel/files/couchdb.in
index f441611..b3c7e98 100755
--- a/rel/files/couchdb.in
+++ b/rel/files/couchdb.in
@@ -31,8 +31,10 @@ export
COUCHDB_QUERY_SERVER_COFFEESCRIPT="{{prefix}}/bin/couchjs {{prefix}}/shar
export COUCHDB_FAUXTON_DOCROOT={{fauxton_root}}
ARGS_FILE="${COUCHDB_ARGS_FILE:-$ROOTDIR/etc/vm.args}"
+[ -n "${COUCHDB_INI_FILES:-}" ] && INI_ARGS="-couch_ini $COUCHDB_INI_FILES"
SYSCONFIG_FILE="${COUCHDB_SYSCONFIG_FILE:-$ROOTDIR/releases/$APP_VSN/sys.config}"
exec "$BINDIR/erlexec" -boot "$ROOTDIR/releases/$APP_VSN/couchdb" \
-args_file "${ARGS_FILE}" \
+ ${INI_ARGS:-} \
-config "${SYSCONFIG_FILE}" "$@"