Skip to content

Commit

Permalink
Better kill of slapd and TLS config fix
Browse files Browse the repository at this point in the history
  • Loading branch information
skoranda committed Jul 21, 2017
1 parent 0ab71bd commit 429254f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions comanage-registry-slapd/docker-slapd-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

Expand Down Expand Up @@ -182,7 +183,7 @@ add: olcTLSProtocolMin
olcTLSProtocolMin: 3.2
EOF
if [[ -f /etc/ldap/slapd.ca.crt ]]; then
cat <<EOF > /tmp/modify.ldif
cat <<EOF >> /tmp/modify.ldif
-
add: olcTLSCACertificateFile
olcTLSCACertificateFile: /etc/ldap/slapd.ca.crt
Expand All @@ -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
Expand Down

0 comments on commit 429254f

Please sign in to comment.