me
/
guix
Archived
1
0
Fork 0

services: Make sure Shepherd destructors match constructors.

This is a followup to b06ecc5751,
211fe3f66e, and
fd57ce267c.

* 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.
Ludovic Courtès 2022-05-02 17:27:13 +02:00
parent 39d6c13fda
commit 2a37f174be
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
3 changed files with 11 additions and 3 deletions

View File

@ -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))

View File

@ -179,7 +179,10 @@ database {
(list #$dicod "--foreground"
(string-append "--config=" #$dicod.conf))
#:user "dicod" #:group "dicod")))
(stop #~(make-kill-destructor))))))
(stop #~(if (and (defined? 'make-inetd-destructor)
#$(= 1 (length interfaces))) ;XXX
(make-inetd-destructor)
(make-kill-destructor)))))))
(define dicod-service-type
(service-type

View File

@ -883,7 +883,9 @@ string, you could instantiate a prosody service like this:
(source "/var/lib/bitlbee")
(target source)
(writable? #t))))))
(stop #~(make-kill-destructor)))))))))
(stop #~(if (defined? 'make-inetd-destructor)
(make-inetd-destructor)
(make-kill-destructor))))))))))
(define %bitlbee-accounts
;; User group and account to run BitlBee.