From a59d1c79966b2fe659b1cebbd0b96b4d95fe2f98 Mon Sep 17 00:00:00 2001 From: Sven Bartscher Date: Fri, 8 Dec 2023 16:52:59 +0100 Subject: [PATCH] Fix prepopulation with mdb Instead of relying on internals to figure out if the ldap database has been prepopulated, we create a marker ourselves. --- entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 9568746..b27b354 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,7 +11,7 @@ SLAPD_FORCE_RECONFIGURE="${SLAPD_FORCE_RECONFIGURE:-false}" first_run=true -if [[ -f "/var/lib/ldap/DB_CONFIG" ]]; then +if [[ -f "/prepopulated" ]]; then first_run=false fi @@ -105,6 +105,7 @@ if [[ "$first_run" == "true" ]]; then slapadd -F /etc/ldap/slapd.d -l "$file" done fi + touch /prepopulated fi chown -R openldap:openldap /etc/ldap/slapd.d/ /var/lib/ldap/ /var/run/slapd/