[systemd-devel] .service and .socket
Reindl Harald
h.reindl at thelounge.net
Wed Jan 2 10:54:51 UTC 2019
Am 02.01.19 um 11:49 schrieb Michael Chapman:
> On Wed, 2 Jan 2019, Reindl Harald wrote:
> [...]
>> agreed, but why can't have socket simply optional a [Service] section to
>> save the "demo at .service" in cases like below?
>>
>> [root at client:/etc/systemd/system]$ cat demo.socket
>> [Unit]
>> Description=Demo Server - Activation Socket
>>
>> [Socket]
>> Accept=yes
>> ListenStream=0.0.0.0:7
>> ListenStream=0.0.0.0:19
>> ListenStream=0.0.0.0:21
>>
>> [Service]
>> Type=oneshot
>> ExecStart=/usr/bin/echo "DEMO-SERVICE"
>> StandardOutput=socket
>> StandardInput=socket
>>
>> [Install]
>> WantedBy=sockets.target
first can you please reply only to the list so that the duplicate
message-filter don't rip the later coming list message after your
off-list copy was received breaking my reply-to-list button and threading?
> Presumably things in [Unit] would only apply to the socket. What if the
> service needs [Unit] directives itself? Do we really want yet another
> special case ("you can embed the service inside the socket... but only if
> the service doesn't need [Unit] directives")?
why would they need only apply to the socket?
> I really don't think combining two units into one file makes things
> simpler.
well, all the 5 socket-activation units i ever wrote have besides
ExecStart boilerplate stuff to make it a valid unit
More information about the systemd-devel
mailing list