On Sun, Oct 13, 2019 at 5:07 PM Marc Haber <[email protected]>
wrote:

> Hallo,
>
> when I want a normal service to be started only after the networks is
> ready, I put
>
> |[Unit]
> |After=network-online.target
> |Wants=network-online.target
>
> into the service unit.
>
> Now I have a socket activated service which I know won't properly start
> (but claim readiness) if started before the network is ready.
>
> Would I put those two lines into foo.service or foo.socket?
>

If you put them in foo.socket -- the socket won't even show up as
"listening" until network-online is reached, and early connection attempts
will immediately fail.

If you put them in foo.service -- the socket will be always listening, but
the service startup will wait until network-online is reached, and early
connection attempts will be queued until the service claims to be ready.

-- 
Mantas Mikulėnas
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to