Subject: [bug#66935] [PATCH v2 1/4] services: dovecot: Use make-kill-destructor for action stop.

From: Bruno Victal <[email-masked]>
Date: Tue, 7 Nov 2023 15:04:49 +0000

* gnu/services/mail.scm (dovecot-shepherd-service): Prefer file-append over
string-append. Prefer shepherd mechanism for issuing stop action.

Change-Id: I6a23fbb70ee4e0a2ba5f8e933e85b97283736f5d
---
 gnu/services/mail.scm | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index 12dcc8e71d..b865a67630 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -1580,12 +1580,9 @@ (define (dovecot-shepherd-service config)
            (provision '(dovecot))
            (requirement '(pam networking))
            (start #~(make-forkexec-constructor
-                     (list (string-append #$dovecot "/sbin/dovecot")
+                     (list #$(file-append dovecot "/sbin/dovecot")
                            "-F")))
-           (stop #~(lambda _
-                     (invoke #$(file-append dovecot "/sbin/dovecot")
-                             "stop")
-                     #f))))))
+           (stop #~(make-kill-destructor))))))
 
 (define %dovecot-pam-services
   (list (unix-pam-service "dovecot")))

base-commit: fb46c1cedab5d00e6afac46bfa514094d5c9e13f
-- 
2.41.0