sysutils/graylog: enable using alternate JVM versions
Future graylog versions in the 5.x series require both newer java versions, and migration from ElasticSearch to OpenSearch. This patch helps smooth the migration path. Reported by: Einar Bjarni Halldórsson <einar@isnic.is>
This commit is contained in:
parent
f3de8d6ac2
commit
09dc4af0af
@ -1,5 +1,6 @@
|
||||
PORTNAME= graylog
|
||||
DISTVERSION= 4.3.9
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= sysutils java
|
||||
MASTER_SITES= https://downloads.graylog.org/releases/
|
||||
DISTFILES= graylog/${DISTNAME}${EXTRACT_SUFX} \
|
||||
@ -18,7 +19,7 @@ LICENSE_PERMS_SSPLv1= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
||||
USES= cpe tar:tgz
|
||||
USE_JAVA= yes
|
||||
|
||||
JAVA_VERSION= 1.8+
|
||||
JAVA_VERSION= 8+
|
||||
JAVA_EXTRACT= yes
|
||||
JAVA_RUN= yes
|
||||
|
||||
@ -38,7 +39,8 @@ GRAYLOG_LOGS_DIR= /var/log/graylog
|
||||
SUB_LIST= GRAYLOG_DATA_DIR=${GRAYLOG_DATA_DIR} \
|
||||
GRAYLOG_LOGS_DIR=${GRAYLOG_LOGS_DIR} \
|
||||
GRAYLOGGROUP=${GRAYLOGGROUP} \
|
||||
GRAYLOGUSER=${GRAYLOGUSER}
|
||||
GRAYLOGUSER=${GRAYLOGUSER} \
|
||||
JAVA_HOME=${JAVA_HOME}
|
||||
|
||||
PLIST_SUB= DISTVERSION=${DISTVERSION} \
|
||||
GRAYLOG_DATA_DIR=${GRAYLOG_DATA_DIR} \
|
||||
|
@ -45,6 +45,10 @@
|
||||
# graylog_log_config (string):
|
||||
# Default value: %%ETCDIR%%/server/log4j2.xml
|
||||
# Path to the Graylog Server logfile
|
||||
#
|
||||
# graylog_java_home (path):
|
||||
# Default value: %%JAVA_HOME%%
|
||||
# Set it to the root of the JDK to use.
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
@ -63,6 +67,7 @@ load_rc_config $name
|
||||
: ${graylog_logs_dir:="%%GRAYLOG_LOGS_DIR%%"}
|
||||
: ${graylog_run_dir:="/var/run/graylog"}
|
||||
: ${graylog_log_config:="%%ETCDIR%%/log4j2.xml"}
|
||||
: ${graylog_java_home:="%%JAVA_HOME%%"}
|
||||
|
||||
java_options=" \
|
||||
-Djava.awt.headless=true \
|
||||
@ -103,6 +108,8 @@ command_args=" \
|
||||
--no-pid-file \
|
||||
--configfile ${graylog_config}"
|
||||
|
||||
export JAVA_HOME=${graylog_java_home}
|
||||
|
||||
required_files="%%LOCALBASE%%/bin/java ${graylog_config}"
|
||||
|
||||
graylog_precmd() {
|
||||
|
Loading…
Reference in New Issue
Block a user