<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 13, 2019 at 5:07 PM Marc Haber <<a href="mailto:mh%2Bsystemd-devel@zugschlus.de">mh+systemd-devel@zugschlus.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hallo,<br>
<br>
when I want a normal service to be started only after the networks is<br>
ready, I put<br>
<br>
|[Unit]<br>
|After=network-online.target<br>
|Wants=network-online.target<br>
<br>
into the service unit.<br>
<br>
Now I have a socket activated service which I know won't properly start<br>
(but claim readiness) if started before the network is ready.<br>
<br>
Would I put those two lines into foo.service or foo.socket?<br></blockquote><div><br></div><div>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.<br></div><div><br></div><div>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.<br clear="all"></div></div><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>