Skip to content

Commit a6bb373

Browse files
committed
openldap debug
1 parent ff005c3 commit a6bb373

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

image/environment/default.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
# General container configuration
99
# see table 5.1 in http://www.openldap.org/doc/admin24/slapdconf2.html for the available log levels.
10-
LDAP_LOG_LEVEL: 0
10+
LDAP_LOG_LEVEL: 256

image/service/slapd/startup.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,14 @@ EOF
126126

127127
# start OpenLDAP
128128
log-helper info "Start OpenLDAP..."
129-
slapd -h "ldap://$HOSTNAME $PREVIOUS_HOSTNAME_PARAM ldap://localhost ldapi:///" -u openldap -g openldap -d $LDAP_LOG_LEVEL 2>&1 &
129+
130+
if log-helper level eq debug; then
131+
# debug
132+
slapd -h "ldap://$HOSTNAME $PREVIOUS_HOSTNAME_PARAM ldap://localhost ldapi:///" -u openldap -g openldap -d $LDAP_LOG_LEVEL 2>&1 &
133+
else
134+
slapd -h "ldap://$HOSTNAME $PREVIOUS_HOSTNAME_PARAM ldap://localhost ldapi:///" -u openldap -g openldap
135+
fi
136+
130137

131138
log-helper info "Waiting for OpenLDAP to start..."
132139
while [ ! -e /run/slapd/slapd.pid ]; do sleep 0.1; done

0 commit comments

Comments
 (0)