2015-05-28 11:32:57 +02:00
|
|
|
# Run Tomcat as this user ID. Not setting this or leaving it blank will use the
|
|
|
|
# default of tomcat{{ tomcat_version}}.
|
|
|
|
TOMCAT{{ tomcat_version}}_USER={{ tomcat_user }}
|
|
|
|
|
|
|
|
# Run Tomcat as this group ID. Not setting this or leaving it blank will use
|
|
|
|
# the default of tomcat{{ tomcat_version}}.
|
|
|
|
TOMCAT{{ tomcat_version}}_GROUP={{ tomcat_user }}
|
|
|
|
|
|
|
|
# The home directory of the Java development kit (JDK). You need at least
|
|
|
|
# JDK version 1.5. If JAVA_HOME is not set, some common directories for
|
|
|
|
# OpenJDK, the Sun JDK, and various J2SE 1.5 versions are tried.
|
|
|
|
{% if jdk_java_home is defined %}
|
|
|
|
JAVA_HOME={{ jdk_java_home }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
JAVA_OPTS="-server -Djava.awt.headless=true"
|
2017-01-17 12:54:01 +01:00
|
|
|
{% if jdk_default <= 7 %}
|
|
|
|
{% if tomcat_permgen_defined %}
|
|
|
|
{% if tomcat_permgen_size is defined %}
|
|
|
|
JAVA_OPTS="-XX:MaxPermSize={{ tomcat_permgen_size }} $JAVA_OPTS"
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2015-05-28 11:32:57 +02:00
|
|
|
{% if tomcat_java_opts is defined %}
|
2017-01-17 12:54:01 +01:00
|
|
|
JAVA_OPTS="{{ tomcat_java_opts }} $JAVA_OPTS"
|
2015-05-28 11:32:57 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if tomcat_java_gc_opts is defined %}
|
|
|
|
JAVA_OPTS="${JAVA_OPTS} {{ tomcat_java_gc_opts }}"
|
|
|
|
{% endif %}
|
|
|
|
{% if tomcat_other_java_opts is defined %}
|
|
|
|
JAVA_OPTS="${JAVA_OPTS} {{ tomcat_other_java_opts }}"
|
|
|
|
{% endif %}
|
|
|
|
{% if tomcat_jmx_enabled %}
|
2015-06-15 18:54:51 +02:00
|
|
|
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port={{ tomcat_jmx_port }} -Dcom.sun.management.jmxremote.ssl={{ tomcat_jmx_use_ssl }} -Dcom.sun.management.jmxremote.local.only={{ tomcat_jmx_localhost_only }}"
|
2015-05-28 11:32:57 +02:00
|
|
|
{% if tomcat_jmx_auth_enabled %}
|
|
|
|
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.password.file={{ tomcat_jmx_auth_dir }}/jmxremote.password -Dcom.sun.management.jmxremote.access.file={{ tomcat_jmx_auth_dir }}/jmxremote.access"
|
|
|
|
{% else %}
|
|
|
|
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
|
|
|
|
{% endif %}
|
2015-06-15 18:54:51 +02:00
|
|
|
{% if tomcat_jmx_disable_additional_ports %}
|
|
|
|
JAVA_OPTS="${JAVA_OPTS} -XX:+DisableAttachMechanism -Dcom.sun.management.jmxremote.rmi.port={{ tomcat_jmx_port }}"
|
|
|
|
{% endif %}
|
2015-05-28 11:32:57 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if tomcat_enable_remote_debugging %}
|
2015-06-15 18:54:51 +02:00
|
|
|
# You will be able to use a java debugger on port {{ tomcat_remote_debugging_port }}.
|
2015-05-28 11:32:57 +02:00
|
|
|
JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,address={{ tomcat_remote_debugging_port }},server=y,suspend=n"
|
|
|
|
{% endif %}
|
|
|
|
# Location of the JVM temporary directory
|
|
|
|
# WARNING: This directory will be destroyed and recreated at every startup !
|
|
|
|
JVM_TMP={{ tomcat_tmp_dir }}
|
2017-09-15 12:44:48 +02:00
|
|
|
{% if catalina_tmp_directory is defined %}
|
|
|
|
export CATALINA_TMPDIR={{ catalina_tmp_directory }}
|
|
|
|
{% endif %}
|
2015-05-28 11:32:57 +02:00
|
|
|
{% if tomcat_load_additional_default_conf %}
|
|
|
|
if [ -f /etc/default/tomcat.local ] ; then
|
|
|
|
. /etc/default/tomcat.local
|
|
|
|
fi
|
|
|
|
{% endif %}
|