[Install] for static systemd unit file?

Felipe Sateler fsateler at debian.org
Thu Mar 2 01:37:53 GMT 2017


On Wed, Mar 1, 2017 at 9:50 PM, Patrick Schleizer
<patrick-mailinglists at whonix.org> wrote:
> Felipe Sateler:
>> On Wed, Mar 1, 2017 at 5:51 PM, Patrick Schleizer
>> <patrick-mailinglists at whonix.org> wrote:
>>> Michael Biebl:
>>>> Am 01.03.2017 um 21:35 schrieb Patrick Schleizer:
>>>>> Hi!
>>>>>
>>>>> TLDR:
>>>>>
>>>>> How should the [Install] section for static systemd unit file look like?
>>>>
>>>> The obvious question is: why does this service need to be statically
>>>> enabled?
>>>
>>> Given the example... With this socket / service file combination, I
>>> wouldn't know how to enable the service non-statically.
>>
>> WantedBy=multi-user.target
>>
>>> In the current
>>> implementation it looks to me right, and works.
>>>
>>> I am still interested to do things the right way. Hence, I am asking
>>> here for advice.
>>
>> Is there a reason you *don't* want to start your service until it is
>> activated?
>
> Right.
>
> (And the reason is, there will be many such redirection sockets /
> services. Many ports will not be used ever by lots of users. This saves
> some RAM and perhaps boot speed. Also reduces noise from 'ps' (not loads
> of duplicate systemd-socket-proxyd processes). Apparently '.socket'
> files, systemd socket activation and systemd-socket-proxyd is fast. No
> noticeable performance penalty in this use case.)

Then you should make sure the service stops when there is no more
input coming in for a while. The socket will continue listening, and
when new traffic arrives, your service will be restarted.




-- 

Saludos,
Felipe Sateler




More information about the Pkg-systemd-maintainers mailing list