diff options
author | Adrien Vergé <adrienverge@gmail.com> | 2019-11-01 15:40:53 +0100 |
---|---|---|
committer | Joan Touzet <wohali@users.noreply.github.com> | 2019-12-18 01:39:36 +0000 |
commit | 98c474598cef1e90b0892e53be1ce324959a13f8 (patch) | |
tree | cc64f80100b8e0c32cb1da87f7f702f8a6c78a09 | |
parent | 850a9934c8cd3eb4ebc0100880ebad47978c46f3 (diff) | |
download | couchdb-98c474598cef1e90b0892e53be1ce324959a13f8.tar.gz |
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.
-rwxr-xr-x | rel/files/couchdb.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rel/files/couchdb.in b/rel/files/couchdb.in index f4416115a..b3c7e98e2 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}" "$@" |