[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A few observations about systemd



On Thu, Jul 21, 2011 at 5:44 PM, Marc Haber
<mh+debian-devel@zugschlus.de> wrote:
> On Wed, 20 Jul 2011 10:36:34 +0200, Tollef Fog Heen <tfheen@err.no>
> wrote:
>>Something like:
>>
>>ExecStartPre=/usr/sbin/update-exim4.conf
>>ExecStart=/usr/sbin/exim4 -bd -q30m
>>
>>should do what you want.
>
> exim4 is one example, and it adds some extra complexity. An exim4
> daemon does two jobs: Running the queue and listening for SMTP.
> Currently, you can configure in /etc/default/exim4 whether you want
> both jobs to be done by the same daemon, two dedicated daemons or only
> one doing one of the jobs. Additionally, there is a special mode for
> ppp-connected systems.
>
> How would I do this with systemd?
>
> Please don't get me wrong: I like the ideas behind systemd, but I need
> some more input to decide whether it's actually as flexible as an init
> script.

I believe the systemd way to handle this would be moving the logic
that automatically configures the daemon with flags or additional
instances out of the init script. In the specific case you mention,
perhaps this functionality should have been built into exim.

A more realistic option would be launching a program (or script) which
would read a configuration file (containing whatever
/etc/default/exim4 contains nowadays) and launch the exim instance(s).
Thus the original init script could also be then greatly simplified
(to the point where it could be defined in a init-system-agnostic
declarative format).

I'm not a maintainer of any package that ships init scripts, so please
take my words with a grain of salt.


Reply to: