Skip to content

Commit

Permalink
Disable adding syncprov module to database while there exists replica…
Browse files Browse the repository at this point in the history
…ting config.
  • Loading branch information
qianwch committed Jul 8, 2021
1 parent 635034a commit 865f034
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion image/service/slapd/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ EOF
function disableReplication() {
sed -i "s|{{ LDAP_BACKEND }}|${LDAP_BACKEND}|g" ${CONTAINER_SERVICE_DIR}/slapd/assets/config/replication/replication-disable.ldif
ldapmodify -c -Y EXTERNAL -Q -H ldapi:/// -f ${CONTAINER_SERVICE_DIR}/slapd/assets/config/replication/replication-disable.ldif 2>&1 | log-helper debug || true
[[ -f "$WAS_STARTED_WITH_REPLICATION" ]] && rm -f "$WAS_STARTED_WITH_REPLICATION"
[[ -f "$WAS_STARTED_WITH_REPLICATION" ]] && rm -f "$WAS_STARTED_WITH_REPLICATION" && \
sed -i '/^# Add syncprov/,/^$/d' ${CONTAINER_SERVICE_DIR}/slapd/assets/config/replication/replication-enable.ldif
}

if [ "${LDAP_REPLICATION,,}" == "true" ]; then
Expand Down

0 comments on commit 865f034

Please sign in to comment.