1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02: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:
Ludovic Courtès
2023-06-24 16:10:03 +02:00
parent d6dc82e8cd
commit deeee98a50

View File

@@ -167,15 +167,15 @@ database {
(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
(addrinfo:addr
(car (getaddrinfo #$(first interfaces)
"dict")))))
(map (lambda (interface)
(endpoint
(addrinfo:addr
(car (getaddrinfo interface "dict")))))
'#$interfaces)
#:requirements '#$requirement
#:user "dicod" #:group "dicod"
#:service-name-stem "dicod")
@@ -183,8 +183,7 @@ database {
(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)))))))