mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
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
2 changed files with 11 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
PORTNAME= couchdb
|
PORTNAME= couchdb
|
||||||
PORTVERSION= 1.6.1
|
PORTVERSION= 1.6.1
|
||||||
PORTREVISION= 1
|
PORTREVISION= 2
|
||||||
PORTEPOCH= 2
|
PORTEPOCH= 2
|
||||||
CATEGORIES= databases
|
CATEGORIES= databases
|
||||||
MASTER_SITES= ${MASTER_SITE_APACHE}
|
MASTER_SITES= ${MASTER_SITE_APACHE}
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
#
|
#
|
||||||
# couchdb_respawn (int): Set to none by default. If CouchDB crashes,
|
# couchdb_respawn (int): Set to none by default. If CouchDB crashes,
|
||||||
# respawn after this many seconds.
|
# 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
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
@ -27,11 +30,12 @@ rcvar=couchdb_enable
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
|
||||||
: ${couchdb_enable="NO"}
|
: ${couchdb_enable:="NO"}
|
||||||
couchdb_user="${couchdb_user:-"couchdb"}"
|
couchdb_user="${couchdb_user:-"couchdb"}"
|
||||||
couchdb_enablelogs="${couchdb_enablelogs:-"YES"}"
|
couchdb_enablelogs="${couchdb_enablelogs:-"YES"}"
|
||||||
couchdb_etcdir="${couchdb_etcdir:-"%%PREFIX%%/etc/couchdb"}"
|
couchdb_etcdir="${couchdb_etcdir:-"%%PREFIX%%/etc/couchdb"}"
|
||||||
couchdb_respawn="${couchdb_respawn:-"0"}"
|
couchdb_respawn="${couchdb_respawn:-"0"}"
|
||||||
|
couchdb_erl_flags="${couchdb_erl_flags:-""}"
|
||||||
|
|
||||||
command="%%PREFIX%%/bin/${name}"
|
command="%%PREFIX%%/bin/${name}"
|
||||||
pidfile="/var/run/${name}/${name}.pid"
|
pidfile="/var/run/${name}/${name}.pid"
|
||||||
|
@ -63,6 +67,11 @@ couchdb_prestart()
|
||||||
errfile=/dev/null
|
errfile=/dev/null
|
||||||
fi
|
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}"
|
command_args="-a ${couchdb_etcdir}/default.ini -a ${couchdb_etcdir}/local.ini ${respawn} -o ${logfile} -e ${errfile} ${command_args}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue