mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
services: dicod: Use one inetd endpoint per interface.
* gnu/services/dict.scm (dicod-shepherd-service): Remove the (= 1 (length interfaces)) restriction by adding one endpoint per interface.
This commit is contained in:
parent
d6dc82e8cd
commit
deeee98a50
1 changed files with 7 additions and 8 deletions
|
@ -167,15 +167,15 @@ (define (dicod-shepherd-service config)
|
|||
(provision '(dicod))
|
||||
(requirement '(user-processes))
|
||||
(documentation "Run the dicod daemon.")
|
||||
(start #~(if (and (defined? 'make-inetd-constructor)
|
||||
#$(= 1 (length interfaces))) ;XXX
|
||||
(start #~(if (defined? 'make-inetd-constructor)
|
||||
(make-inetd-constructor
|
||||
(list #$dicod "--inetd" "--foreground"
|
||||
(string-append "--config=" #$dicod.conf))
|
||||
(list (endpoint
|
||||
(map (lambda (interface)
|
||||
(endpoint
|
||||
(addrinfo:addr
|
||||
(car (getaddrinfo #$(first interfaces)
|
||||
"dict")))))
|
||||
(car (getaddrinfo interface "dict")))))
|
||||
'#$interfaces)
|
||||
#:requirements '#$requirement
|
||||
#:user "dicod" #:group "dicod"
|
||||
#:service-name-stem "dicod")
|
||||
|
@ -183,8 +183,7 @@ (define (dicod-shepherd-service config)
|
|||
(list #$dicod "--foreground"
|
||||
(string-append "--config=" #$dicod.conf))
|
||||
#:user "dicod" #:group "dicod")))
|
||||
(stop #~(if (and (defined? 'make-inetd-destructor)
|
||||
#$(= 1 (length interfaces))) ;XXX
|
||||
(stop #~(if (defined? 'make-inetd-destructor)
|
||||
(make-inetd-destructor)
|
||||
(make-kill-destructor)))
|
||||
(actions (list (shepherd-configuration-action dicod.conf)))))))
|
||||
|
|
Loading…
Reference in a new issue