Skip to content

Commit

Permalink
With systemd on tomcat >= 8.5 we add custom protocol handlers based o…
Browse files Browse the repository at this point in the history
…n the default when running tomcat with catalina.sh

Signed-off-by: Mark Kusch <[email protected]>
  • Loading branch information
Mark Kusch committed Nov 1, 2016
1 parent f473a61 commit b976ac3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/service_systemd.j2
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ ExecStart={{ ansible_local.java.general.java_home }}/bin/java \
{% endif %}
{% if item.prefer_ipv4|default(tomcat_default_prefer_ipv4) %}
-Djava.net.preferIPv4Stack=true \
{% endif %}
{% if tomcat_version|version_compare('8.5', '>=') %}
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources \
{% endif %}
-classpath "{{ tomcat_env_catalina_home }}/bin/bootstrap.jar:{{ tomcat_env_catalina_home }}/bin/tomcat-juli.jar" \
org.apache.catalina.startup.Bootstrap start
Expand Down Expand Up @@ -71,6 +74,9 @@ ExecStop={{ ansible_local.java.general.java_home }}/bin/java \
{% endif %}
{% if item.prefer_ipv4|default(tomcat_default_prefer_ipv4) %}
-Djava.net.preferIPv4Stack=true \
{% endif %}
{% if tomcat_version|version_compare('8.5', '>=') %}
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources \
{% endif %}
-classpath "{{ tomcat_env_catalina_home }}/bin/bootstrap.jar:{{ tomcat_env_catalina_home }}/bin/tomcat-juli.jar" \
org.apache.catalina.startup.Bootstrap stop
Expand Down

0 comments on commit b976ac3

Please sign in to comment.