3 ms·
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 themselve
by kaba0 4y 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.
- traverseda 4y agoSure, 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.
- bravetraveler 4y ago> 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.socket.html https://www.freedesktop.org/software/systemd/man/systemd.soc... No need for multiple anything, the units can be parameterized -- user@my.service, for example
- traverseda 4y agoOh I know it's possible, I just don't think you should be doing that in an init system.
- bravetraveler 4y agoUnderstood, fair enough. I'm not too bothered by it, it's been useful here and there
- kaba0 4y agoSocket 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.