Re: [systemd-devel] .service and .socket

2019-01-02 Thread Reindl Harald
Am 02.01.19 um 12:12 schrieb Michael Chapman: > On Wed, 2 Jan 2019, Reindl Harald wrote: >> 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

Re: [systemd-devel] .service and .socket

2019-01-02 Thread Michael Chapman
On Wed, 2 Jan 2019, Reindl Harald wrote: > 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@.service" in cases like below? > >> > >>

Re: [systemd-devel] .service and .socket

2019-01-02 Thread Lennart Poettering
On Mi, 02.01.19 11:38, Olaf van der Spek (m...@vdspek.org) wrote: > > I mean, I am all for changing and simplifying things, and even if this > > creates temporary redundancy, but it has to stay temporary, i.e. there > > needs to be a clear path to a new scheme that can cover the old scheme > >

Re: [systemd-devel] .service and .socket

2019-01-02 Thread Reindl Harald
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@.service" in cases like below? >> >> [root@client:/etc/systemd/system]$ cat demo.socket >> [Unit] >>

Re: [systemd-devel] .service and .socket

2019-01-02 Thread 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@.service" in cases like below? > > [root@client:/etc/systemd/system]$ cat demo.socket > [Unit] > Description=Demo Server - Activation Socket > > [Socket] >

Re: [systemd-devel] .service and .socket

2019-01-02 Thread Olaf van der Spek
On Wed, Jan 2, 2019 at 11:05 AM Lennart Poettering wrote: > > On Di, 01.01.19 13:46, Olaf van der Spek (m...@vdspek.org) wrote: > We could of course add redundancy here, and allow socket activation > both with embedded information in service unit files (as you suggest) > and with separate socket

Re: [systemd-devel] .service and .socket

2019-01-02 Thread Reindl Harald
Am 02.01.19 um 11:05 schrieb Lennart Poettering: > On Di, 01.01.19 13:46, Olaf van der Spek (m...@vdspek.org) wrote: >> AFAIK socket units require a separate file, which seems more complex >> then it has to be. > > The main reason why socket and service units are separate is that this > way

Re: [systemd-devel] .service and .socket

2019-01-02 Thread Lennart Poettering
On Mi, 02.01.19 17:31, Michael Chapman (m...@very.puzzling.org) wrote: > > 2. If not, could the .service file gain a default / implicit > > dependency on the .socket file? > > There are a some reasons for not having a .service dependent upon its > .socket. Many services can be started directly

Re: [systemd-devel] .service and .socket

2019-01-02 Thread Lennart Poettering
On Di, 01.01.19 13:46, Olaf van der Spek (m...@vdspek.org) wrote: > Hi, > > AFAIK socket units require a separate file, which seems more complex > then it has to be. The main reason why socket and service units are separate is that this way they may be separately scheduled. i.e. a socket can be

Re: [systemd-devel] .service and .socket

2019-01-02 Thread Jérémy Rosen
On 02/01/2019 07:31, Michael Chapman wrote: On Tue, 1 Jan 2019, Olaf van der Spek wrote: Hi, AFAIK socket units require a separate file, which seems more complex then it has to be. 1. Could sockets be specified directly in the .service file? If anything, I should think it would work the

Re: [systemd-devel] .service and .socket

2019-01-01 Thread Michael Chapman
On Tue, 1 Jan 2019, Olaf van der Spek wrote: > Hi, > > AFAIK socket units require a separate file, which seems more complex > then it has to be. > > 1. Could sockets be specified directly in the .service file? If anything, I should think it would work the other way around: a .socket without