services: dicod-service: Honor 'dicod-configuration-dico'.

* gnu/services/dict.scm (dicod-shepherd-service): Use
'dicod-configuration-dico' of config.
This commit is contained in:
宋文武 2016-11-19 19:37:30 +08:00
parent ae1e2133b9
commit e5aade794a
No known key found for this signature in database
GPG Key ID: 26525665AE727D37
1 changed files with 11 additions and 9 deletions

View File

@ -105,15 +105,17 @@ database {
(chown rundir (passwd:uid user) (passwd:gid user))))) (chown rundir (passwd:uid user) (passwd:gid user)))))
(define (dicod-shepherd-service config) (define (dicod-shepherd-service config)
(list (shepherd-service (let ((dicod (file-append (dicod-configuration-dico config)
(provision '(dicod)) "/bin/dicod"))
(documentation "Run the dicod daemon.") (dicod.conf (dicod-configuration-file config)))
(start #~(make-forkexec-constructor (list (shepherd-service
(list (string-append #$dico "/bin/dicod") "--foreground" (provision '(dicod))
(string-append (documentation "Run the dicod daemon.")
"--config=" #$(dicod-configuration-file config))) (start #~(make-forkexec-constructor
#:user "dicod" #:group "dicod")) (list #$dicod "--foreground"
(stop #~(make-kill-destructor))))) (string-append "--config=" #$dicod.conf))
#:user "dicod" #:group "dicod"))
(stop #~(make-kill-destructor))))))
(define dicod-service-type (define dicod-service-type
(service-type (service-type