FS#35775 - [tomcat6][tomcat7] Use EnvironmentFile in the systemd service file
Attached to Project:
Arch Linux
Opened by Lukas Jirkovsky (6xx) - Thursday, 13 June 2013, 13:24 GMT
Last edited by Guillaume ALAUX (galaux) - Saturday, 15 June 2013, 13:04 GMT
Opened by Lukas Jirkovsky (6xx) - Thursday, 13 June 2013, 13:24 GMT
Last edited by Guillaume ALAUX (galaux) - Saturday, 15 June 2013, 13:04 GMT
|
Details
Description:
It would be neat if tomcat6 and tomcat7 used environment files to set the necessary environment instead of setting up the environment in the .service file directly. An example of package that uses EnvironmentFile is nfs-utils package (nfsd.service). |
This task depends upon
From [0]:
"Although environment files are easy to use, upstream systemd recommends a different approach. Their recommendation for administrators who need to reconfigure systemd .service files is to copy them from /lib/systemd/system to /etc/systemd/system and modify them there. Unit files in /etc/systemd/system override those in /lib/systemd/system if they otherwise carry the same name."
What is the purpose of splitting this service files into 2 files? Any particular reason? Just to be clear, files used in EnvironmentFile are not bash file and thus should not be used anywhere else.
Last thing: I read about systemd support of config files using a "conf.d/" dir which would look like this but cannot find it anymore.
[0] http://fedoraproject.org/wiki/Packaging:Systemd#EnvironmentFiles_and_support_for_.2Fetc.2Fsysconfig_files
What I meant by that is that files in /etc/conf.d are bash like config files. Putting systemd emvironment files in there seems odd. Also as users could be tricked into thinking these could be used by regular bash scripts.
> I think splitting the configuration to the environment file is cleaner in a way that when you edit service file, there's a ton of clutter that has nothing to do with the configuration itself
Don't get me wrong, I'm totally in favor of using separate config files but it just seems in systemd's way, these service files are precisely the config files. They are not sourced but read by systemd to get details on how to handle services.
> The configuration has always been in configuration files in /etc
Well it still is as systemd's way is to customize this service file in /etc/systemd/system/.