Add ability to pass JVM options to rc script
Add LICENSE Define config files as @sample PR: 220815 Submitted by: timp87@gmail.com
This commit is contained in:
parent
ade69b76d5
commit
cf736a72df
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=449045
3 changed files with 15 additions and 6 deletions
|
@ -2,12 +2,15 @@
|
|||
|
||||
PORTNAME= zookeeper
|
||||
PORTVERSION= 3.4.10
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel java
|
||||
MASTER_SITES= APACHE/${PORTNAME}/current
|
||||
|
||||
MAINTAINER= skreuzer@FreeBSD.org
|
||||
COMMENT= Coordination Service for Distributed Applications
|
||||
|
||||
LICENSE= APACHE20
|
||||
|
||||
RUN_DEPENDS= slf4j>=1.7.5:devel/slf4j \
|
||||
netty>=3.5.5:java/netty \
|
||||
jline>=0.9.94:devel/jline \
|
||||
|
@ -17,6 +20,8 @@ RUN_DEPENDS= slf4j>=1.7.5:devel/slf4j \
|
|||
USERS= zookeeper
|
||||
GROUPS= zookeeper
|
||||
|
||||
ZOOKEEPER_CONFS= configuration.xsl log4j.properties zoo.cfg
|
||||
|
||||
ZOOKEEPER_JAR= ${WRKSRC}/${PORTNAME}-${PORTVERSION}.jar
|
||||
|
||||
ZOOKEEPER_DBDIR?= /var/db/zookeeper
|
||||
|
@ -47,10 +52,13 @@ PORTDOCS= *
|
|||
|
||||
post-extract:
|
||||
@${REINPLACE_CMD} "/dataDir/s|=.*|=${ZOOKEEPER_DBDIR}|" ${WRKDIR}/${DISTNAME}/conf/zoo_sample.cfg
|
||||
@${RM} ${WRKDIR}/${DISTNAME}/conf/zoo_sample.cfg.bak
|
||||
@${MV} ${WRKDIR}/${DISTNAME}/conf/zoo_sample.cfg ${WRKDIR}/${DISTNAME}/conf/zoo.cfg
|
||||
|
||||
do-install:
|
||||
${CP} -Rp ${WRKDIR}/${DISTNAME}/conf/ ${STAGEDIR}${ETCDIR}
|
||||
@${MKDIR} ${STAGEDIR}${ETCDIR}
|
||||
.for f in ${ZOOKEEPER_CONFS}
|
||||
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/conf/${f} ${STAGEDIR}${ETCDIR}/${f}.sample
|
||||
.endfor
|
||||
${INSTALL_DATA} ${ZOOKEEPER_JAR} ${STAGEDIR}${JAVALIBDIR}
|
||||
(cd ${STAGEDIR}/${JAVAJARDIR} && ${LN} -nfs \
|
||||
${PORTNAME}-${PORTVERSION}.jar ${PORTNAME}.jar)
|
||||
|
|
|
@ -25,6 +25,7 @@ load_rc_config "${name}"
|
|||
: ${zookeeper_log4jpropfile:=file:%%ETCDIR%%/log4j.properties}
|
||||
: ${zookeeper_rootlogger:="INFO,ROLLINGFILE"}
|
||||
: ${zookeeper_logdir:=%%ZOOKEEPER_LOGDIR%%}
|
||||
: ${zookeeper_jvmopts:=}
|
||||
|
||||
JAVA=%%JAVA%%
|
||||
JAVAJARDIR=%%JAVAJARDIR%%
|
||||
|
@ -44,7 +45,7 @@ procname=${JAVA}
|
|||
required_files="${zookeeper_config}"
|
||||
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-p ${pidfile} ${JAVA} ${log4j_params} ${zookeeper_main}"
|
||||
command_args="-p ${pidfile} ${JAVA} ${zookeeper_jvmopts} ${log4j_params} ${zookeeper_main}"
|
||||
|
||||
start_precmd="zookeeper_init"
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ bin/zkCli.sh
|
|||
bin/zkServer.sh
|
||||
%%JAVAJARDIR%%/zookeeper-%%PORTVERSION%%.jar
|
||||
%%JAVAJARDIR%%/zookeeper.jar
|
||||
%%ETCDIR%%/log4j.properties
|
||||
%%ETCDIR%%/configuration.xsl
|
||||
%%ETCDIR%%/zoo_sample.cfg
|
||||
@sample %%ETCDIR%%/log4j.properties.sample
|
||||
@sample %%ETCDIR%%/configuration.xsl.sample
|
||||
@sample %%ETCDIR%%/zoo.cfg.sample
|
||||
@dir(zookeeper,zookeeper,755) %%ZOOKEEPER_LOGDIR%%
|
||||
@dir(zookeeper,zookeeper,755) %%ZOOKEEPER_DBDIR%%
|
||||
|
|
Loading…
Reference in a new issue