diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-06-24 16:10:03 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-06-24 16:11:07 +0200 |
commit | deeee98a50267660439109ce8ef8fe856bdb1846 (patch) | |
tree | d36fbf5e3c41f35bc7e6142f553cdcf3a55c407d /gnu | |
parent | d6dc82e8cdb2d6114a12b06d449ce7f1150c7f70 (diff) | |
download | guix-deeee98a50267660439109ce8ef8fe856bdb1846.tar.gz |
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.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/services/dict.scm | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gnu/services/dict.scm b/gnu/services/dict.scm index 90d3c35b6c..23e1d36364 100644 --- a/gnu/services/dict.scm +++ b/gnu/services/dict.scm @@ -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))))))) |