From 429254f49a4d8a92b4395ea816c8a0cfd5e2d8f0 Mon Sep 17 00:00:00 2001 From: Scott Koranda Date: Fri, 21 Jul 2017 08:52:05 -0500 Subject: [PATCH] Better kill of slapd and TLS config fix --- comanage-registry-slapd/docker-slapd-entrypoint | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/comanage-registry-slapd/docker-slapd-entrypoint b/comanage-registry-slapd/docker-slapd-entrypoint index 2afb6d4..b7c1b08 100755 --- a/comanage-registry-slapd/docker-slapd-entrypoint +++ b/comanage-registry-slapd/docker-slapd-entrypoint @@ -86,7 +86,8 @@ EOF # Kill slapd and remove the directory created by the Debian installation # that was copied over and used to allow slapd to start initially. - killall slapd + kill -INT `cat /var/run/slapd/slapd.pid` + sleep 1 rm -f /var/lib/ldap/* @@ -182,7 +183,7 @@ add: olcTLSProtocolMin olcTLSProtocolMin: 3.2 EOF if [[ -f /etc/ldap/slapd.ca.crt ]]; then - cat < /tmp/modify.ldif + cat <> /tmp/modify.ldif - add: olcTLSCACertificateFile olcTLSCACertificateFile: /etc/ldap/slapd.ca.crt @@ -201,7 +202,8 @@ EOF ldapmodify -Y EXTERNAL -H ldapi:/// -a -f /etc/ldap/schema/openssh-lpk.ldif 2>&1 # Stop slapd. - killall slapd + kill -INT `cat /var/run/slapd/slapd.pid` + sleep 1 # Fix permissions. chown -R openldap:openldap /var/lib/ldap