[systemd-devel] How to mount NFS prior to start postgresql from this volume

Michael Biebl mbiebl at gmail.com
Sat Jul 2 07:26:01 UTC 2016


2016-07-02 2:44 GMT+02:00 Lennart Poettering <lennart at poettering.net>:
> On Fri, 01.07.16 14:44, wolfgang.wagner at riwa-gis.de (wolfgang.wagner at riwa-gis.de) wrote:
>
>> My postgresql.service is this:  (unmodified file)
>> [Unit]
>> Description=PostgreSQL RDBMS
>>
>> [Service]
>> Type=oneshot
>> ExecStart=/bin/true
>> ExecReload=/bin/true
>> RemainAfterExit=on
>>
>> [Install]
>> WantedBy=multi-user.target
>
> Hmm, not sure how postgresql is setup on your distro, but the above
> unit file is pretty much a nop. How does your postgresql at .service
> template unit file look like though?

I guess all the postgresql at .service files declare a
PartOf=postgres.service and have [Install]WantedBy=postgres.service.

This way systemctl start/stop/restart/reload postgresql.service will
forward that to all instances.
A target would probably be more suited for that, but targets currently
have limitations (e.g. regarding forwarding reload) so this doesn't
work and one has to misuse such a nop service.

Regards,
Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the systemd-devel mailing list