The systemd blog contains two articles that advice against using /etc/sysconfig or /etc/default:
- http://0pointer.de/blog/projects/on-etc-sysinit.html
- http://0pointer.de/blog/projects/the-new-configuration-files.html
What alternatives are there to configure system specific options for a systemd unit file?
Options I've considered:
- create a template unit instead and use a specifier
The downside is that you need to specify the option every time the service is started. This is mainly useful to run multiple copies of a single service so it is not really applicable.
- override the
Execstart
of the unit file locally with aunitd.d
directory
The disadvantage here is that this requires to override the entire Execstart
. It cannot be used to simply specify a single option.