Allow passing ERL_ZFLAGS to CouchDB via couchdb_erl_flags in rc.conf.
ERL_ZFLAGS is used to configure the Erlang VM itself (see also erl(1), "EMULATOR FLAGS") PR: 197847 Submitted by: Dave Cottlehuber
This commit is contained in:
parent
3d2f9ec3b2
commit
2bc036ce3b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=379802
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= couchdb
|
||||
PORTVERSION= 1.6.1
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
PORTEPOCH= 2
|
||||
CATEGORIES= databases
|
||||
MASTER_SITES= ${MASTER_SITE_APACHE}
|
||||
|
@ -19,6 +19,9 @@
|
||||
#
|
||||
# couchdb_respawn (int): Set to none by default. If CouchDB crashes,
|
||||
# respawn after this many seconds.
|
||||
#
|
||||
# couchdb_erl_flags (string): Set to none by default. Additional Erlang flags
|
||||
# that are appended via ERL_ZFLAGS to the Erlang VM parameters.
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -27,11 +30,12 @@ rcvar=couchdb_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${couchdb_enable="NO"}
|
||||
: ${couchdb_enable:="NO"}
|
||||
couchdb_user="${couchdb_user:-"couchdb"}"
|
||||
couchdb_enablelogs="${couchdb_enablelogs:-"YES"}"
|
||||
couchdb_etcdir="${couchdb_etcdir:-"%%PREFIX%%/etc/couchdb"}"
|
||||
couchdb_respawn="${couchdb_respawn:-"0"}"
|
||||
couchdb_erl_flags="${couchdb_erl_flags:-""}"
|
||||
|
||||
command="%%PREFIX%%/bin/${name}"
|
||||
pidfile="/var/run/${name}/${name}.pid"
|
||||
@ -63,6 +67,11 @@ couchdb_prestart()
|
||||
errfile=/dev/null
|
||||
fi
|
||||
|
||||
# couchdb supports passing options through to the erlang vm directly in
|
||||
# ERL_ZFLAGS which is appended to CouchDB own flags.
|
||||
ERL_ZFLAGS=${couchdb_erl_flags}
|
||||
export ERL_ZFLAGS
|
||||
|
||||
command_args="-a ${couchdb_etcdir}/default.ini -a ${couchdb_etcdir}/local.ini ${respawn} -o ${logfile} -e ${errfile} ${command_args}"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user