Added ENABLE_JMX option

This commit is contained in:
Geoff Bourne
2020-04-03 12:32:46 -05:00
parent d131941b62
commit d62c2ffb42
2 changed files with 21 additions and 0 deletions
+15
View File
@@ -96,6 +96,21 @@ if [ -n "$JVM_DD_OPTS" ]; then
done
fi
if isTrue ${ENABLE_JMX}; then
: ${JMX_HOST:=0.0.0.0}
: ${JMX_PORT:=7091}
JVM_OPTS="${JVM_OPTS}
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.port=${JMX_PORT}
-Dcom.sun.management.jmxremote.rmi.port=${JMX_PORT}
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.host=${JMX_HOST}
-Djava.rmi.server.hostname=${JMX_HOST}"
log "JMX is enabled. Make sure you have port forwarding for ${JMX_PORT}"
fi
mcServerRunnerArgs="--stop-duration 60s"
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then