summary refs log tree commit diff
path: root/gnu/services/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-05-02 17:27:13 +0200
committerLudovic Courtès <ludo@gnu.org>2022-05-02 17:57:30 +0200
commit2a37f174becbafd70591f6eb1d98493c5c1df0e2 (patch)
tree028c0f836be69b4829828bdb248455371eb5d4ff /gnu/services/base.scm
parent39d6c13fda7e9bad7116d450a28a1fcafaef03f8 (diff)
downloadguix-2a37f174becbafd70591f6eb1d98493c5c1df0e2.tar.gz
services: Make sure Shepherd destructors match constructors.
This is a followup to b06ecc57515d4e3c8b2228e8142654e9a26ba6e1,
211fe3f66e6dfdaa64974931c458ab1d92afc182, and
fd57ce267c4083fe98242caa31075d2bd62903bf.

* gnu/services/base.scm (guix-publish-shepherd-service): Change 'stop'
method to use 'make-systemd-destructor' when 'make-systemd-constructor'
is used.
* gnu/services/dict.scm (dicod-shepherd-service): Change 'stop' method
to use 'make-inetd-destructor' when 'make-inetd-constructor' is used.
* gnu/services/messaging.scm (bitlbee-shepherd-service): Likewise.
Diffstat (limited to 'gnu/services/base.scm')
-rw-r--r--gnu/services/base.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index e324864744..bcec888587 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1914,7 +1914,10 @@ raise a deprecation warning if the 'compression-level' field was used."
                           (make-systemd-constructor
                            #$command #$endpoints #$@options)
                           (make-forkexec-constructor #$command #$@options)))
-             (stop #~(make-kill-destructor)))))))
+             (stop #~(if (and (defined? 'make-systemd-destructor)
+                              #$(not advertise?))
+                         (make-systemd-destructor)
+                         (make-kill-destructor))))))))
 
 (define %guix-publish-accounts
   (list (user-group (name "guix-publish") (system? #t))