mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-04-30 14:18:38 +02:00
cleaning
This commit is contained in:
parent
b9553b913f
commit
deb424e698
2 changed files with 17 additions and 9 deletions
|
@ -20,10 +20,10 @@
|
|||
(openldap openldap-configuration-openldap ;<package>
|
||||
(default openldap)
|
||||
)
|
||||
(arguments openldap-configuration-arguments ;list of strings
|
||||
(extra-args openldap-configuration-arguments ;list of strings
|
||||
(default '())
|
||||
)
|
||||
(logflags openldap-configuration-logflags ;number
|
||||
(log-flags openldap-configuration-logflags ;number
|
||||
(default "0")
|
||||
)
|
||||
(log-file openldap-configuration-log-file ; string
|
||||
|
@ -35,17 +35,16 @@
|
|||
(config-file openldap-configuration-config-file ; string
|
||||
(default %default-slapd.conf)
|
||||
)
|
||||
(schema-dir openldap-configuration-schema-dir ; string
|
||||
(default '())
|
||||
)
|
||||
)
|
||||
|
||||
(define %default-slapd.conf
|
||||
(plain-file "slapd.conf" "
|
||||
# Empty file for test
|
||||
"))
|
||||
|
||||
(define openldap-shepherd-service
|
||||
(match-lambda
|
||||
(($ <openldap-configuration> openldap arguments logflags log-file pid-file config-file schema-dir)
|
||||
(($ <openldap-configuration> openldap extra-args log-flags log-file pid-file config-file)
|
||||
(list
|
||||
(shepherd-service
|
||||
(provision '(slapd) )
|
||||
|
@ -54,12 +53,15 @@
|
|||
(respawn? #f)
|
||||
(start #~(make-forkexec-constructor
|
||||
(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")
|
||||
"-h 'ldap:/// ldaps:///'"
|
||||
"-d" #$logflags
|
||||
"-d" #$log-flags
|
||||
"-f" #$config-file
|
||||
#$extra-args
|
||||
)
|
||||
#:pid-file #$pid-file
|
||||
#:log-file #$log-file
|
||||
))
|
||||
(stop #~(make-kill-destructor))
|
||||
)
|
||||
|
@ -67,6 +69,7 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define openldap-service-type
|
||||
(service-type (name 'slapd)
|
||||
(extensions
|
||||
|
|
|
@ -23,9 +23,12 @@
|
|||
(define-record-type* <rc-local-configuration>
|
||||
rc-local-configuration make-rc-local-configuration
|
||||
rc-local-configuration?
|
||||
(config-file rc-local-config-file ; string
|
||||
(config-file rc-local-config-file
|
||||
(default %default-rc-local-conf)
|
||||
)
|
||||
(log-file rc-local-log-file
|
||||
(default "/var/log/rc-local.log")
|
||||
)
|
||||
)
|
||||
|
||||
(define rc-local-service
|
||||
|
@ -37,12 +40,14 @@
|
|||
(documentation "Run rc-local.")
|
||||
(requirement '(user-processes))
|
||||
(respawn? #f)
|
||||
(one-shot? #t)
|
||||
(start #~(make-forkexec-constructor
|
||||
(list
|
||||
#$(file-append bash "/bin/bash")
|
||||
"-l"
|
||||
#$config-file
|
||||
)
|
||||
#:log-file #$log-file
|
||||
))
|
||||
(stop #~(make-kill-destructor))
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue