mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-04-30 14:18:38 +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>
|
(define-record-type* <openldap-configuration>
|
||||||
openldap-configuration make-openldap-configuration
|
openldap-configuration make-openldap-configuration
|
||||||
openldap-configuration?
|
openldap-configuration?
|
||||||
(openldap openldap-configuration-openldap ;<package>
|
(openldap openldap-configuration-openldap
|
||||||
(default openldap)
|
(default openldap)
|
||||||
)
|
)
|
||||||
(logflags openldap-configuration-logflags ;number
|
(uri openldap-configuration-uri
|
||||||
|
(default "ldapi:// ldap://")
|
||||||
|
)
|
||||||
|
(logflags openldap-configuration-logflags
|
||||||
(default "0")
|
(default "0")
|
||||||
)
|
)
|
||||||
(pid-file openldap-configuration-pid-file ; string
|
(pid-file openldap-configuration-pid-file
|
||||||
(default "/var/run/openldap/slapd.pid")
|
(default "/var/run/openldap/slapd.pid")
|
||||||
)
|
)
|
||||||
(config-file openldap-configuration-config-file ; string
|
(config-file openldap-configuration-config-file
|
||||||
(default %default-slapd.conf)
|
(default %default-slapd.conf)
|
||||||
)
|
)
|
||||||
|
(log-file openldap-configuration-log-file
|
||||||
|
(default "/var/log/slapd.log")
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(define %default-slapd.conf
|
(define %default-slapd.conf
|
||||||
|
@ -38,7 +44,7 @@
|
||||||
|
|
||||||
(define openldap-shepherd-service
|
(define openldap-shepherd-service
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(($ <openldap-configuration> openldap logflags pid-file config-file)
|
(($ <openldap-configuration> openldap uri logflags pid-file config-file log-file)
|
||||||
(list
|
(list
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
(provision '(slapd) )
|
(provision '(slapd) )
|
||||||
|
@ -48,10 +54,12 @@
|
||||||
(start #~(make-forkexec-constructor
|
(start #~(make-forkexec-constructor
|
||||||
(list
|
(list
|
||||||
#$(file-append openldap "/libexec/slapd")
|
#$(file-append openldap "/libexec/slapd")
|
||||||
|
"-h" #$uri
|
||||||
"-d" #$logflags
|
"-d" #$logflags
|
||||||
"-f" #$config-file
|
"-f" #$config-file
|
||||||
)
|
)
|
||||||
#:pid-file #$pid-file
|
#:pid-file #$pid-file
|
||||||
|
#:log-file #$log-file
|
||||||
))
|
))
|
||||||
(stop #~(make-kill-destructor))
|
(stop #~(make-kill-destructor))
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue