Hacker News new | ask | show | jobs
by kaba0 1285 days ago
Starting a service is way different than the service itself, what if I want it to be started when a request hits a given port? Also, the service files themselves are usually packaged up and are immutable, and every user will want different behavior on when it is started.

To me it sounds like proper architecture and your solution would be needless close coupling.

1 comments

Sure, then let me put a command in my files instead of requiring a separate service.

>what if I want it to be started when a request hits a given port?

I really don't think you should be turning your init system into a general programming environment that can do that.

> I really don't think you should be turning your init system into a general programming environment that can do that.

We have :) https://www.freedesktop.org/software/systemd/man/systemd.soc...

No need for multiple anything, the units can be parameterized -- user@my.service, for example

Oh I know it's possible, I just don't think you should be doing that in an init system.
Understood, fair enough. I'm not too bothered by it, it's been useful here and there
Socket activation is declarative. My last point is the dynamic one, but that is just calling out to systemd. The point is, all three can share the same service description.