From 8d9647d8a77a67013c48166561134d92b5224264 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 11 Nov 2022 18:56:35 +0100 Subject: services: Add Shepherd 'configuration' action to various services. * gnu/services/avahi.scm (avahi-shepherd-service): Add 'actions' field. * gnu/services/base.scm (nscd-actions): Add call to 'shepherd-configuration-action'. * gnu/services/desktop.scm (upower-shepherd-service): Add 'actions' field. (elogind-shepherd-service): Likewise. * gnu/services/dict.scm (dicod-shepherd-service): Likewise. * gnu/services/networking.scm (openntpd-shepherd-service): Likewise. (tor-shepherd-service): Likewise. * gnu/services/ssh.scm (openssh-shepherd-service): Likewise. * gnu/services/web.scm (nginx-shepherd-service): Likewise. * gnu/services/xorg.scm (gdm-shepherd-service): Likewise. * gnu/tests/base.scm (run-basic-test)["nscd configuration action"]: New test. * doc/guix.texi (Services): Document it. --- gnu/services/ssh.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gnu/services/ssh.scm') diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index 72e7183590..7b038e6ac6 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm @@ -524,9 +524,12 @@ of user-name/file-like tuples." (define max-connections (openssh-configuration-max-connections config)) + (define config-file + (openssh-config-file config)) + (define openssh-command #~(list (string-append #$(openssh-configuration-openssh config) "/sbin/sshd") - "-D" "-f" #$(openssh-config-file config))) + "-D" "-f" #$config-file)) (define inetd-style? ;; Whether to use 'make-inetd-constructor'. That procedure appeared in @@ -568,6 +571,7 @@ of user-name/file-like tuples." (stop #~(if #$inetd-style? (make-inetd-destructor) (make-kill-destructor))) + (actions (list (shepherd-configuration-action config-file))) (auto-start? (openssh-auto-start? config))))) (define (openssh-pam-services config) -- cgit v1.2.3