❦ 6 mai 2019 13:46 +02, William Lallemand <[email protected]>:
>> /etc/default is a debianism. Other distros use different directories,
>> such as RedHat which uses /etc/sysconfig
>>
>> -Patrick
>
> Hi Patrick,
>
> I don't think that's a problem, most distribution use their own unit file
> anyway, people should edit this file before using it.
One of the promise of systemd was to be able to share unit files accross
distribution. For this, systemd wants to discourage the use of
/etc/default and /etc/sysconfig (there was even a discussion about
deprecating EnvironmentFile). You can still use the EXTRAOPTS approach
by using:
ExecStart=/usr/sbin/haproxy -Ws -f $CONFIG $EXTRAOPTS
And let people override EXTRAOPTS with an override:
Environment=EXTRAOPTS=somethingmore
However, many people prefer /etc/default and /etc/sysconfig to systemd
overrides. And for distribution, it enables a smoother transition. For
Debian, we would still add the EnvironmentFile directive. You could
still be compatible with both styles of distribution with:
EnvironmentFile=-/etc/default/haproxy
EnvironmentFile=-/etc/sysconfig/haproxy
--
Use the "telephone test" for readability.
- The Elements of Programming Style (Kernighan & Plauger)
signature.asc
Description: PGP signature

