mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
services: Make sure Shepherd destructors match constructors.
This is a followup tob06ecc5751
,211fe3f66e
, andfd57ce267c
. * 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.
This commit is contained in:
parent
39d6c13fda
commit
2a37f174be
3 changed files with 11 additions and 3 deletions
|
@ -1914,7 +1914,10 @@ (define (config->compression-options config)
|
||||||
(make-systemd-constructor
|
(make-systemd-constructor
|
||||||
#$command #$endpoints #$@options)
|
#$command #$endpoints #$@options)
|
||||||
(make-forkexec-constructor #$command #$@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
|
(define %guix-publish-accounts
|
||||||
(list (user-group (name "guix-publish") (system? #t))
|
(list (user-group (name "guix-publish") (system? #t))
|
||||||
|
|
|
@ -179,7 +179,10 @@ (define (dicod-shepherd-service config)
|
||||||
(list #$dicod "--foreground"
|
(list #$dicod "--foreground"
|
||||||
(string-append "--config=" #$dicod.conf))
|
(string-append "--config=" #$dicod.conf))
|
||||||
#:user "dicod" #:group "dicod")))
|
#: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
|
(define dicod-service-type
|
||||||
(service-type
|
(service-type
|
||||||
|
|
|
@ -883,7 +883,9 @@ (define bitlbee-shepherd-service
|
||||||
(source "/var/lib/bitlbee")
|
(source "/var/lib/bitlbee")
|
||||||
(target source)
|
(target source)
|
||||||
(writable? #t))))))
|
(writable? #t))))))
|
||||||
(stop #~(make-kill-destructor)))))))))
|
(stop #~(if (defined? 'make-inetd-destructor)
|
||||||
|
(make-inetd-destructor)
|
||||||
|
(make-kill-destructor))))))))))
|
||||||
|
|
||||||
(define %bitlbee-accounts
|
(define %bitlbee-accounts
|
||||||
;; User group and account to run BitlBee.
|
;; User group and account to run BitlBee.
|
||||||
|
|
Loading…
Reference in a new issue