[systemd-devel] How to only allow service to start when network-online.target is met?

Lennart Poettering lennart at poettering.net
Thu Oct 31 11:39:38 UTC 2019


On Di, 17.09.19 15:44, Dom Rodriguez (shymega at shymega.org.uk) wrote:

> Hello,
>
> I've got a service unit, which is linked to a timer unit, and I'd like to have
> the behaviour associated with `Condition=` directives, but for targets. To
> explain further, my desired expectation is for the service unit to *only* start
> when the target is active. Ideally, I don't want the service unit to fail
> either, but have similar behaviour with `Condition=`, which doesn't mark the
> unit as failed, but merely not meeting condition(s).
>
> Is this possible with systemd?

Requisite= can do this, but it causes the depending unit to fail if
the depnded-on unit is not activated yet or in the process of being
activated.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list