Skip to content

Commit

Permalink
Attempt to improve setup-slapd.sh stability
Browse files Browse the repository at this point in the history
Don't restart multiple times, restart at the end where we already have a retry
loop with a small delay.

Closes GH-11590
  • Loading branch information
iluuu1994 committed Jul 5, 2023
1 parent 46e9c51 commit 4cc800f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/scripts/setup-slapd.sh
Expand Up @@ -44,8 +44,6 @@ DBDN=`sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(&(olcRootD

sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif

sudo service slapd restart

sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF
dn: $DBDN
changetype: modify
Expand Down Expand Up @@ -90,8 +88,6 @@ add: olcModuleLoad
olcModuleLoad: dds
EOF

sudo service slapd restart

sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// << EOF
dn: olcOverlay=sssvlv,$DBDN
objectClass: olcOverlayConfig
Expand All @@ -116,17 +112,13 @@ objectClass: olcDdsConfig
olcOverlay: dds
EOF

sudo service slapd restart

sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF
dn: $DBDN
changetype: modify
add: olcDbIndex
olcDbIndex: entryExpireTimestamp eq
EOF

sudo service slapd restart

ldapadd -H ldapi:/// -D cn=Manager,dc=my-domain,dc=com -w secret <<EOF
dn: dc=my-domain,dc=com
objectClass: top
Expand Down Expand Up @@ -164,6 +156,8 @@ o: php ldap tests
## pwdSafeModify: FALSE
EOF

sudo service slapd restart

# Verify TLS connection
tries=0
while : ; do
Expand Down

0 comments on commit 4cc800f

Please sign in to comment.