services: dovecot: 'stop' method returns #f upon success.
authorLudovic Courtès <ludo@gnu.org>
Mon, 20 Apr 2020 20:30:09 +0000 (22:30 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 20 Apr 2020 22:06:40 +0000 (00:06 +0200)
* gnu/services/mail.scm (dovecot-shepherd-service)[stop]: Use 'invoke'
instead of 'make-forkexec-constructor'.  Previously, the 'stop' method
would return the PID of the "dovecot stop" process, which would be
interpreted as a failure to stop the service.

gnu/services/mail.scm

index 7791780..cfcaf46 100644 (file)
@@ -1544,9 +1544,10 @@ greyed out, instead of only later giving \"not selectable\" popup error.
            (start #~(make-forkexec-constructor
                      (list (string-append #$dovecot "/sbin/dovecot")
                            "-F")))
-           (stop #~(make-forkexec-constructor
-                    (list (string-append #$dovecot "/sbin/dovecot")
-                          "stop")))))))
+           (stop #~(lambda _
+                     (invoke #$(file-append dovecot "/sbin/dovecot")
+                             "stop")
+                     #f))))))
 
 (define %dovecot-pam-services
   (list (unix-pam-service "dovecot")))