1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

Fix Java CLASSPATH settings to launch riemann

PR:		217457
Submitted by:	jeromer@fastmail.net
Approved by:	maintainer, mat (mentor)
Differential Revision: https://reviews.freebsd.org/D9977
This commit is contained in:
Kirill Ponomarev 2017-03-13 18:25:44 +00:00
parent 78458da1c7
commit 04e39cfa0c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=436104
2 changed files with 14 additions and 10 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= riemann
PORTVERSION= 0.2.12
PORTREVISION= 1
CATEGORIES= net-mgmt java
MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${PORTVERSION}/
@ -17,7 +18,6 @@ NO_ARCH= yes
USE_JAVA= yes
JAVA_VERSION= 1.7+
SUB_FILES= ${PORTNAME}
SUB_LIST= JAVA_HOME=${JAVA_HOME} \
RIEMANN_USER=${RIEMANN_USER} \
RIEMANN_GROUP=${RIEMANN_GROUP} \

View File

@ -12,14 +12,16 @@
# riemann_enable (bool): Set to NO by default.
# Set it to YES to enable riemann.
#
# riemann_config (string): Optional full path for riemann config file
# riemann_user (user): Set to riemann by default.
# riemann_group (group): Set to riemann by default.
# riemann_jarfile (string): Optional path to a custom jarfile.
# riemann_java_home (args): Specify which JVM to use, if not default.
# riemann_min_mem (num): Minumum JVM heap size, 256m by default.
# riemann_max_mem (num): Maximum JVM heap size, 1g by default.
# riemann_java_opts (args): Additional JVM properties or arguments.
# riemann_config (string): Optional full path for riemann config file
# riemann_user (user): Set to riemann by default.
# riemann_group (group): Set to riemann by default.
# riemann_jarfile (string): Optional path to a custom jarfile.
# riemann_java_home (args): Specify which JVM to use, if not default.
# riemann_java_classpath (args): Specify a custom Java ClassPath.
# riemann_min_mem (num): Minumum JVM heap size, 256m by default.
# riemann_max_mem (num): Maximum JVM heap size, 1g by default.
# riemann_java_opts (args): Additional JVM properties or arguments.
. /etc/rc.subr
name="riemann"
@ -35,7 +37,9 @@ load_rc_config $name
: ${riemann_java_home:="%%JAVA_HOME%%"}
: ${riemann_min_mem:="256m"}
: ${riemann_max_mem:="1g"}
: ${riemann_java_classpath:=${riemann_jarfile}}
: ${riemann_java_opts:=" -server \
-cp ${riemann_java_classpath} \
-Dapp=${name} \
-Xms${riemann_min_mem} \
-Xmx${riemann_max_mem} \
@ -59,7 +63,7 @@ command="/usr/sbin/daemon"
command_args="-f -t ${name} -c -r -P ${pidfile} \
${riemann_java_home}/bin/java \
${riemann_java_opts} \
-jar ${riemann_jarfile} ${riemann_config}"
riemann.bin start ${riemann_config}"
required_files="${java_cmd} ${riemann_config}"
riemann_prestart()