https://bugzilla.redhat.com/show_bug.cgi?id=842346
--- Comment #17 from Ade Lee <alee(a)redhat.com> ---
OK, after a lot of experimentation, I've figured out the best and simplest
option for me, which is to simply modify my own unit files (the unit files for
pki-tomcat@.service) to be similar to what you currently have. This way, I
will not have to create any new unit or config files.
For reference, my /lib/systemd/system/pki-tomcatd@.service file will look like:
[Unit]
Description=PKI Tomcat Server %i
After=pki-tomcatd.target syslog.target network.target
PartOf=pki-tomcatd.target
[Service]
Type=simple
EnvironmentFile=/etc/tomcat/tomcat.conf
Environment="NAME=%i"
EnvironmentFile=-/etc/sysconfig/%i
ExecStart=/usr/libexec/tomcat/server start
ExecStop=/usr/libexec/tomcat/server stop
SuccessExitStatus=143
User=pkiuser
Group=pkiuser
[Install]
WantedBy=multi-user.target
A couple changes you might want to consider:
1. Adding an identifier %i to the description, so you know which unit file has
been executed.
2. Using %i instead of %I for the NAME variable. This will allow names with a
dash in them to work correctly. Names as a path with relevant substitutions
make no sense for instance names.
One more thing. When I use this unit file (or even the tomcat@.service file
you propose), all my startup output ends up going to /var/log/messages instead
of catalina.out. How do I fix that?
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug
https://bugzilla.redhat.com/token.cgi?t=m17yg8oDgP&a=cc_unsubscribe