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

Re: Systemd: Error when replacing postfix LSB init with postfix.service on Debian 8 (jessie)



Tom Browder <tom.browder@gmail.com> wrote:
> On Sun, Aug 20, 2017 at 12:30 Sven Hartge <sven@svenhartge.de> wrote:

>> That unit file does effectivly nothing. It just starts "/bin/true" and
>> exits.
>>
>> What it *not* does is starting postfix in any way.
>>
>> This looks like there should be some other unit files which start the
>> other daemons belonging to postfix which depend on this unit file, so
>> you could easily start and stop everything with one command.
>>
>> Are you sure you only got this one unit file from the postfix developer?

> No, I got it from a package installation of postfix on Debian 9.

> So the question I have is how does it all work?  There is no init.d,
> but there seems to be some convoluted handling that I haven't figured
> out yet.  Surely some expert can write a postfix.service file that
> drives postfix commands.

As I suspected:

postfix contains an instanced service file.

The one you posted is just for convenience, to be able to start and stop
all instances at the same time.

The real "meat" is done via postfix@.service, which is a template. This
is coupled with a generator, "postfix-instance-generator" which creates
new instances on the fly, based on the output of "postmulti -l -a".

I don't know if you could transplant this mechanism from postfix3
(version in Stretch) to postfix2 (version in Jessie).

Question: Why do you want to manually replace the init-script from
postfix in Jessie with a systemd.unit? What do you want to accomplish by
doing so (other than creating a possible broken system)?

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.


Reply to: