[systemd-devel] Antw: [EXT] Re: Still confused with socket activation

Reindl Harald h.reindl at thelounge.net
Mon Feb 8 10:27:41 UTC 2021



Am 08.02.21 um 10:10 schrieb Ulrich Windl:
>>>> Andrei Borzenkov <arvidjaar at gmail.com> schrieb am 06.02.2021 um 09:14 in
> Nachricht <09aa6a69-ee37-ffea-c4fd-e4c5d3327023 at gmail.com>:
>> 04.02.2021 10:47, Ulrich Windl пишет:
> ...
>>> I had provided the full units yesterday. Basically I don't know what to do:
> 
>> I
>>> just want to start the service and its sockets at a specific point in time
> 
>> and
>>> also want to stop those at another time.
>>>
>>
>> We are going in circles. socket unit is optimization that allows you to
>> start service unit on demand instead of starting it unconditionally. If
>> you want to start service unit in controlled way (and not when someone
>> decides to connect to socket) you should not use socket unit. Period.
> 
> All I want is that the sockets that need to listen actually do listen when the
> service start.
> It seems systemd messes with that in a bad way

this is *not* what systemd-sockets are for
they are for service is started at the first connect

what you want is the classical "i start a service and it listens, i stop 
a service and it don't listen any longer"

so just do that and leave socket-activation alone, no need for any 
.socket unit at all

in other words:

* you don't want socket activation
* just do not use socket activation




More information about the systemd-devel mailing list