unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#38477] [PATCH] services: SSH services: Provide 'ssh' and 'sshd' Shepherd services.
@ 2019-12-03 20:00 Leo Famulari
  2019-12-04  3:06 ` Brett Gilio
  0 siblings, 1 reply; 3+ messages in thread
From: Leo Famulari @ 2019-12-03 20:00 UTC (permalink / raw)
  To: 38477

This should improve the "user experience" when querying the status of
the SSH service.  We could even add program specific strings like
"lshd", "dropbear", and "openssh".  Thoughts?

* gnu/services/ssh.scm (lsh-shepherd-service, dropbear-shepherd-service,
openssh-sheperd-service): Add 'ssh' and 'sshd' to provision.
---
 gnu/services/ssh.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index ced1991fba..7e25810eff 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -174,7 +174,7 @@
 
   (list (shepherd-service
          (documentation "GNU lsh SSH server")
-         (provision '(ssh-daemon))
+         (provision '(ssh-daemon ssh sshd))
          (requirement requires)
          (start #~(make-forkexec-constructor (list #$@lsh-command)))
          (stop  #~(make-kill-destructor)))))
@@ -511,7 +511,7 @@ of user-name/file-like tuples."
   (list (shepherd-service
          (documentation "OpenSSH server.")
          (requirement '(syslogd loopback))
-         (provision '(ssh-daemon))
+         (provision '(ssh-daemon ssh sshd))
          (start #~(make-forkexec-constructor #$openssh-command
                                              #:pid-file #$pid-file))
          (stop #~(make-kill-destructor))
@@ -620,7 +620,7 @@ of user-name/file-like tuples."
   (list (shepherd-service
          (documentation "Dropbear SSH server.")
          (requirement requires)
-         (provision '(ssh-daemon))
+         (provision '(ssh-daemon ssh sshd))
          (start #~(make-forkexec-constructor #$dropbear-command
                                              #:pid-file #$pid-file))
          (stop #~(make-kill-destructor)))))
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#38477] [PATCH] services: SSH services: Provide 'ssh' and 'sshd' Shepherd services.
  2019-12-03 20:00 [bug#38477] [PATCH] services: SSH services: Provide 'ssh' and 'sshd' Shepherd services Leo Famulari
@ 2019-12-04  3:06 ` Brett Gilio
  2019-12-04 13:32   ` bug#38477: " Leo Famulari
  0 siblings, 1 reply; 3+ messages in thread
From: Brett Gilio @ 2019-12-04  3:06 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 38477

Leo Famulari <leo@famulari.name> writes:

> This should improve the "user experience" when querying the status of
> the SSH service.  We could even add program specific strings like
> "lshd", "dropbear", and "openssh".  Thoughts?

I think this is a good idea. It would add a lot of granular
control. However, we would need to make sure this is a standard used for
other SSH options in the future.

> * gnu/services/ssh.scm (lsh-shepherd-service, dropbear-shepherd-service,
> openssh-sheperd-service): Add 'ssh' and 'sshd' to provision.
> ---
>  gnu/services/ssh.scm | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
> index ced1991fba..7e25810eff 100644
> --- a/gnu/services/ssh.scm
> +++ b/gnu/services/ssh.scm
> @@ -174,7 +174,7 @@
>  
>    (list (shepherd-service
>           (documentation "GNU lsh SSH server")
> -         (provision '(ssh-daemon))
> +         (provision '(ssh-daemon ssh sshd))
>           (requirement requires)
>           (start #~(make-forkexec-constructor (list #$@lsh-command)))
>           (stop  #~(make-kill-destructor)))))
> @@ -511,7 +511,7 @@ of user-name/file-like tuples."
>    (list (shepherd-service
>           (documentation "OpenSSH server.")
>           (requirement '(syslogd loopback))
> -         (provision '(ssh-daemon))
> +         (provision '(ssh-daemon ssh sshd))
>           (start #~(make-forkexec-constructor #$openssh-command
>                                               #:pid-file #$pid-file))
>           (stop #~(make-kill-destructor))
> @@ -620,7 +620,7 @@ of user-name/file-like tuples."
>    (list (shepherd-service
>           (documentation "Dropbear SSH server.")
>           (requirement requires)
> -         (provision '(ssh-daemon))
> +         (provision '(ssh-daemon ssh sshd))
>           (start #~(make-forkexec-constructor #$dropbear-command
>                                               #:pid-file #$pid-file))
>           (stop #~(make-kill-destructor)))))

LGTM! Very simple solution. Should be easy to cross-implement to other uses.

-- 
Brett M. Gilio
https://git.sr.ht/~brettgilio/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#38477: [PATCH] services: SSH services: Provide 'ssh' and 'sshd' Shepherd services.
  2019-12-04  3:06 ` Brett Gilio
@ 2019-12-04 13:32   ` Leo Famulari
  0 siblings, 0 replies; 3+ messages in thread
From: Leo Famulari @ 2019-12-04 13:32 UTC (permalink / raw)
  To: Brett Gilio; +Cc: 38477-done

On Tue, Dec 03, 2019 at 09:06:28PM -0600, Brett Gilio wrote:
> Leo Famulari <leo@famulari.name> writes:
> 
> > This should improve the "user experience" when querying the status of
> > the SSH service.  We could even add program specific strings like
> > "lshd", "dropbear", and "openssh".  Thoughts?
> 
> I think this is a good idea. It would add a lot of granular
> control. However, we would need to make sure this is a standard used for
> other SSH options in the future.

Okay, all are welcome to make this change :)

> LGTM! Very simple solution. Should be easy to cross-implement to other uses.

Thanks! Pushed as 1a7633c2397714c492482282da670e47f7dc8177

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-04 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 20:00 [bug#38477] [PATCH] services: SSH services: Provide 'ssh' and 'sshd' Shepherd services Leo Famulari
2019-12-04  3:06 ` Brett Gilio
2019-12-04 13:32   ` bug#38477: " Leo Famulari

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).