Skip to content

Commit

Permalink
Fix service file
Browse files Browse the repository at this point in the history
  • Loading branch information
bviktor committed Jan 21, 2023
1 parent ed25a7d commit ff5e654
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions templates/tomcat.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
Description=Tomcat servlet container
After=network.target

# TODO How did this work with 'simple' before?
# Maybe it is possible to prevent started state until 'Server startup' appears
# in catalina.out? Same for stopped state with 'Destroyed ProtocolHandler'.
[Service]
Type=simple
Type=forking

User=tomcat
Group=tomcat

Environment="JAVA_HOME=/usr/lib/jvm/{% if ansible_os_family == 'Debian' %}default-java{% else %}jre{% endif %}"
# TODO It's impossible to determine reliably with the various distros, flavors,
# and versions. Only required for debugging anyway, so leave this out for now.
#Environment="JAVA_HOME=/usr/lib/jvm/{% if ansible_os_family == 'Debian' %}default-java{% else %}jre{% endif %}"
Environment="JAVA_OPTS={{ eff_java_options }}"

Environment="CATALINA_BASE={{ eff_tomcat_home }}"
Expand Down

0 comments on commit ff5e654

Please sign in to comment.