Explorar o código

add LDAP_CFSSL_PREFIX

Bertrand Gouny %!s(int64=10) %!d(string=hai) anos
pai
achega
d5aa48b335
Modificáronse 3 ficheiros con 6 adicións e 2 borrados
  1. 2 1
      README.md
  2. 3 0
      image/environment/default.yaml.startup
  3. 1 1
      image/service/slapd/startup.sh

+ 2 - 1
README.md

@@ -250,7 +250,7 @@ Replication options:
 	- ldap://ldap.example.org
   - ldap://ldap2.example.org
 	```
-	
+
 	If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python:
 
 		docker run --env LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']" --detach osixia/openldap:1.1.0
@@ -259,6 +259,7 @@ Replication options:
 
 Other environment variables:
 - **LDAP_REMOVE_CONFIG_AFTER_SETUP**: delete config folder after setup. Defaults to `true`
+- **LDAP_CFSSL_PREFIX**: cfssl environment variables prefix. Defaults to `ldap`, cfssl-helper first search config from LDAP_CFSSL_* variables, before CFSSL_* variables.
 
 
 ### Set your own environment variables

+ 3 - 0
image/environment/default.yaml.startup

@@ -44,3 +44,6 @@ LDAP_REPLICATION_HOSTS:
 
 # Remove config after setup
 LDAP_REMOVE_CONFIG_AFTER_SETUP: true
+
+# cfssl environment variables prefix
+LDAP_CFSSL_PREFIX: ldap # cfssl-helper first search config from LDAP_CFSSL_* variables, before CFSSL_* variables.

+ 1 - 1
image/service/slapd/startup.sh

@@ -57,7 +57,7 @@ if [ ! -e "$FIRST_START_DONE" ]; then
 
     # generate a certificate and key with cfssl tool if LDAP_CRT and LDAP_KEY files don't exists
     # https://github.com/osixia/docker-light-baseimage/blob/stable/image/service-available/:cfssl/assets/tool/cfssl-helper
-    cfssl-helper ldap $LDAP_CRT $LDAP_KEY $CA_CRT
+    cfssl-helper $LDAP_CFSSL_PREFIX $LDAP_CRT $LDAP_KEY $CA_CRT
 
     # create DHParamFile if not found
     [ -f ${DH_PARAM} ] || openssl dhparam -out ${DH_PARAM} 2048