tomcat: Don't use forking in tomcat.service #140

Open
mtrossevin wants to merge 1 commits from mtrossevin/ansible-roles:tomcat-service-update into unstable
Owner

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.

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](https://tomcat.apache.org/tomcat-7.0-doc/setup.html#Unix_daemon) [use signals to stop the service](https://commons.apache.org/proper/commons-daemon/jsvc.html) 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.
mtrossevin added 1 commit 2021-11-24 11:08:00 +01:00
continuous-integration/drone/pr Build is failing Details
503806e9e6
tomcat: Don't use forking in tomcat.service
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.
Some checks failed
continuous-integration/drone/pr Build is failing
This pull request has changes conflicting with the target branch.
  • CHANGELOG.md
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b mtrossevin-tomcat-service-update unstable
git pull tomcat-service-update

Step 2:

Merge the changes and update on Forgejo.
git checkout unstable
git merge --no-ff mtrossevin-tomcat-service-update
git push origin unstable
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: evolix/ansible-roles#140
No description provided.