503806e9e6
Some checks failed
continuous-integration/drone/pr Build is failing
Having `ExecStart=[…]/catalina.sh run` and `Type=simple` result in tomcat doing everything systemd is expecting without the need to fork or adding a secondary daemon manager just for this tomcat service. That means that we don't need ExecStop anymore as the shutdown port is only there as a OS agnostic shutdown method. The jsvc (aka officially documented) method of launching tomcat use signals to stop the service just as systemd will when no ExecStop= is in the unit file so we know it will work properly. Moreover add the SyslogIdentifier= directive to make each tomcat easier to find in the system log.
17 lines
311 B
Django/Jinja
17 lines
311 B
Django/Jinja
[Unit]
|
|
Description=Tomcat %u.
|
|
After=network.target
|
|
|
|
[Service]
|
|
WorkingDirectory=%h
|
|
Environment="CATALINA_BASE=%h"
|
|
EnvironmentFile=%h/conf/env
|
|
UMask=0002
|
|
ExecStart=/usr/share/tomcat{{ tomcat_version }}/bin/catalina.sh run
|
|
Restart=on-failure
|
|
|
|
SyslogIdentifier=tomcat-instance-%u
|
|
|
|
[Install]
|
|
WantedBy=default.target
|