openldap service

This commit is contained in:
Jean-François GUILLAUME 2021-12-02 22:09:56 +01:00
parent 3249213c9e
commit 2008c7c2d5

View file

@ -35,9 +35,11 @@
(config-file openldap-configuration-config-file ; string (config-file openldap-configuration-config-file ; string
(default %default-slapd.conf) (default %default-slapd.conf)
) )
(schema-dir openldap-configuration-schema-dir ; string
(default '())
)
) )
(define %default-slapd.conf (define %default-slapd.conf
(plain-file "slapd.conf" " (plain-file "slapd.conf" "
# Empty file for test # Empty file for test
@ -45,7 +47,7 @@
(define openldap-shepherd-service (define openldap-shepherd-service
(match-lambda (match-lambda
(($ <openldap-configuration> openldap arguments logflags log-file pid-file config-file) (($ <openldap-configuration> openldap arguments logflags log-file pid-file config-file schema-dir)
(list (list
(shepherd-service (shepherd-service
(provision '(slapd) ) (provision '(slapd) )
@ -54,12 +56,9 @@
(respawn? #f) (respawn? #f)
(start #~(make-forkexec-constructor (start #~(make-forkexec-constructor
(list (list
; We do not set the uri in the service definition because if we do, we need a way to
; escape double quotes. You should use slapd.conf to set the uri
#$(file-append openldap "/libexec/slapd") #$(file-append openldap "/libexec/slapd")
"-d" #$logflags "-d" #$logflags
"-f" #$config-file "-f" #$config-file
#$arguments
) )
#:pid-file #$pid-file #:pid-file #$pid-file
)) ))