mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-04-30 06:08:37 +02:00
openldap service
This commit is contained in:
parent
efc1497e16
commit
da0a763962
1 changed files with 13 additions and 5 deletions
|
@ -17,18 +17,24 @@
|
|||
(define-record-type* <openldap-configuration>
|
||||
openldap-configuration make-openldap-configuration
|
||||
openldap-configuration?
|
||||
(openldap openldap-configuration-openldap ;<package>
|
||||
(openldap openldap-configuration-openldap
|
||||
(default openldap)
|
||||
)
|
||||
(logflags openldap-configuration-logflags ;number
|
||||
(uri openldap-configuration-uri
|
||||
(default "ldapi:// ldap://")
|
||||
)
|
||||
(logflags openldap-configuration-logflags
|
||||
(default "0")
|
||||
)
|
||||
(pid-file openldap-configuration-pid-file ; string
|
||||
(pid-file openldap-configuration-pid-file
|
||||
(default "/var/run/openldap/slapd.pid")
|
||||
)
|
||||
(config-file openldap-configuration-config-file ; string
|
||||
(config-file openldap-configuration-config-file
|
||||
(default %default-slapd.conf)
|
||||
)
|
||||
(log-file openldap-configuration-log-file
|
||||
(default "/var/log/slapd.log")
|
||||
)
|
||||
)
|
||||
|
||||
(define %default-slapd.conf
|
||||
|
@ -38,7 +44,7 @@
|
|||
|
||||
(define openldap-shepherd-service
|
||||
(match-lambda
|
||||
(($ <openldap-configuration> openldap logflags pid-file config-file)
|
||||
(($ <openldap-configuration> openldap uri logflags pid-file config-file log-file)
|
||||
(list
|
||||
(shepherd-service
|
||||
(provision '(slapd) )
|
||||
|
@ -48,10 +54,12 @@
|
|||
(start #~(make-forkexec-constructor
|
||||
(list
|
||||
#$(file-append openldap "/libexec/slapd")
|
||||
"-h" #$uri
|
||||
"-d" #$logflags
|
||||
"-f" #$config-file
|
||||
)
|
||||
#:pid-file #$pid-file
|
||||
#:log-file #$log-file
|
||||
))
|
||||
(stop #~(make-kill-destructor))
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue