Add support for a bundled JVM in bin/graylogctl (#13980)

* Add support for a bundled JVM in bin/graylogctl

* Add changelog entry
This commit is contained in:
Bernd Ahlers
2022-11-16 15:59:40 +01:00
committed by GitHub
parent e023ca3550
commit fa52331106
2 changed files with 11 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ done
# take variables from environment if set
GRAYLOGCTL_DIR=${GRAYLOGCTL_DIR:=$(dirname "$GRAYLOGCTL")}
GRAYLOG_JVM_DIR="$(dirname "$GRAYLOGCTL_DIR")/jvm"
GRAYLOG_SERVER_JAR=${GRAYLOG_SERVER_JAR:=graylog.jar}
GRAYLOG_CONF=${GRAYLOG_CONF:=/etc/graylog/server/server.conf}
GRAYLOG_PID=${GRAYLOG_PID:=/tmp/graylog.pid}
@@ -53,6 +54,12 @@ LOG_FILE=${LOG_FILE:=log/graylog-server.log}
LOG4J=${LOG4J:=}
DEFAULT_JAVA_OPTS="-Dlog4j2.formatMsgNoLookups=true -Djdk.tls.acknowledgeCloseNotify=true -Xms1g -Xmx1g -XX:+UseG1GC -server -XX:-OmitStackTraceInFastThrow"
if [ -z "$JAVA_HOME" ] && [ -d "$GRAYLOG_JVM_DIR" ]; then
echo "Using bundled JVM in $GRAYLOG_JVM_DIR"
export JAVA_HOME="$GRAYLOG_JVM_DIR"
JAVA_CMD="$GRAYLOG_JVM_DIR/bin/java"
fi
JAVA_OPTS="${JAVA_OPTS:="$DEFAULT_JAVA_OPTS"}"
start() {

View File

@@ -0,0 +1,4 @@
type = "add"
message = "Update `bin/graylogctl` to support a bundled JVM."
pulls = ["13980"]