Skip to content

Commit

Permalink
Allow disabling jmx via HIVEMQ_JMX_ENABLED=false env var
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Apr 26, 2024
1 parent c967ed7 commit d36d89f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/distribution/bin/diagnostics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ if [ -c "/dev/urandom" ]; then
fi

# JMX Monitoring
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=${HIVEMQ_JMX_PORT:-9010} -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
if [ "${HIVEMQ_JMX_ENABLED:-true}" == "true" ]; then
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=${HIVEMQ_JMX_PORT:-9010} -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
fi

# Disable Localization
JAVA_OPTS="$JAVA_OPTS -Duser.language=en -Duser.region=US"
Expand Down
4 changes: 3 additions & 1 deletion src/distribution/bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ if [ -c "/dev/urandom" ]; then
fi

# JMX Monitoring
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=${HIVEMQ_JMX_PORT:-9010} -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
if [ "${HIVEMQ_JMX_ENABLED:-true}" == "true" ]; then
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=${HIVEMQ_JMX_PORT:-9010} -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
fi

# Disable Localization
JAVA_OPTS="$JAVA_OPTS -Duser.language=en -Duser.region=US"
Expand Down

0 comments on commit d36d89f

Please sign in to comment.