Thank you all for the helpful advice!
Additional question:
Am 22.09.2017 um 09:05 schrieb James Hogarth
<james.hogarth(a)gmail.com>:
Small side note... don't use .include as it's not recommended and long since
deprecated.
Use a systemd unit override which is the supported way of handling it.
mkdir /etc/systemd/system/mariadb.service.d
Pop a .conf file in there with the directives you want to override.
If you do 'systemctl edit <unit_name>' that's how it organises things.
unfortunately I have not overly much experience with systemd at the moment. I did some
internet search, and I guess I had to do
# systemctl edit tomcat@[myUniqueInstanceName]
and then insert into the edit windows
[Service]
LimitNoFile=8200
and save
So I double the no of open files for that specific instance.
I Would be grateful if you could confirm or correct this.
Back to the question of the OP ... sounds like you are in the perfect area of
requirements for a unit template with each tomcat instance from the template and override
User in each to make them different and individually controllable.
To start my various Tomcat instances I execute various calls of:
systemctl start tomcat@[myUniqueInstanceName]
So I guess Fedora tomcat package already uses unit templates.
In /usr/lib/systemd/system/tomcat@.service unit file I find
- - - - <
[Service]
. . .
Environment="NAME=%I"
EnvironmentFile=-/etc/sysconfig/tomcat@%I
ExecStart=/usr/libexec/tomcat/server start
. . .
User=tomcat
Group=tomcat
- - - - <
So, there is a mechanism to perform an instance specific configuration using a file in
/etc/sysconfig, nevertheless the user name is hard coded into the unit file, I guess.
So my only options are to either modify the unit file to make the user configurable (and
provide a patch to Fedora) or to use the "systemctl edit
tomcat@[myinstancename]" facility to overwrite the user per instance?
Thanks for your support and help.
Peter