Skip to content

Commit 2b1342a

Browse files
committed
Backport setup-slapd.sh changes
1 parent 1210b47 commit 2b1342a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/scripts/setup-slapd.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ sudo sed -e 's|^\s*SLAPD_SERVICES\s*=.*$|SLAPD_SERVICES="ldap:/// ldaps:/// ldap
4242
# Configure LDAP database.
4343
DBDN=`sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(&(olcRootDN=*)(olcSuffix=*))' dn | grep -i '^dn:' | sed -e 's/^dn:\s*//'`;
4444

45-
sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
45+
if test -f "/etc/ldap/schema/ppolicy.ldif"; then
46+
sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
47+
fi
4648

4749
sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF
4850
dn: $DBDN

0 commit comments

Comments
 (0)