[Install] for static systemd unit file?

Patrick Schleizer patrick-mailinglists at whonix.org
Thu Mar 2 02:39:00 GMT 2017


Felipe Sateler:
> 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.

That makes a lot sense. I would like to do that.

Apparently systemd-socket-proxyd has no timeout option.

https://www.freedesktop.org/software/systemd/man/systemd-socket-proxyd.html

I wouldn't know how to do that.





More information about the Pkg-systemd-maintainers mailing list