On Wed, 2 Jan 2019, Reindl Harald wrote:
[...]
> agreed, but why can't have socket simply optional a [Service] section to
> save the "[email protected]" in cases like below?
>
> [root@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
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")?
I really don't think combining two units into one file makes things
simpler.
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel