File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 1- NAME = osixia/openldap
2- VERSION = 1.5.0
1+ NAME ? = osixia/openldap
2+ VERSION ? = 1.5.1
33
44.PHONY : build build-nocache test tag-latest push push-latest release git-tag-version
55
Original file line number Diff line number Diff line change @@ -465,15 +465,21 @@ EOF
465465 log-helper info " Add replication config..."
466466 disableReplication || true
467467
468- i=1
468+ i=0
469+ LDAP_SERVER_ID_FROM=${LDAP_SERVER_ID_FROM:- 1}
470+ LDAP_SERVER_ID_FROM=${LDAP_CONFIG_REPL_ID_FROM:- 1}
471+ LDAP_DB_REPL_ID_FROM=${LDAP_DB_REPL_ID_FROM:- 101}
472+ log-helper debug " $LDAP_REPLICATION_HOSTS "
473+ cat ${CONTAINER_SERVICE_DIR} /slapd/assets/config/replication/replication-enable.ldif
469474 for host in $( complex-bash-env iterate LDAP_REPLICATION_HOSTS)
470475 do
471- sed -i " s|{{ LDAP_REPLICATION_HOSTS }}|olcServerID: $i ${! host} \n{{ LDAP_REPLICATION_HOSTS }}|g" ${CONTAINER_SERVICE_DIR} /slapd/assets/config/replication/replication-enable.ldif
472- sed -i " s|{{ LDAP_REPLICATION_HOSTS_CONFIG_SYNC_REPL }}|olcSyncRepl: rid=00 $i provider=${! host} ${LDAP_REPLICATION_CONFIG_SYNCPROV} \n{{ LDAP_REPLICATION_HOSTS_CONFIG_SYNC_REPL }}|g" ${CONTAINER_SERVICE_DIR} /slapd/assets/config/replication/replication-enable.ldif
473- sed -i " s|{{ LDAP_REPLICATION_HOSTS_DB_SYNC_REPL }}|olcSyncRepl: rid=10 $i provider=${! host} ${LDAP_REPLICATION_DB_SYNCPROV} \n{{ LDAP_REPLICATION_HOSTS_DB_SYNC_REPL }}|g" ${CONTAINER_SERVICE_DIR} /slapd/assets/config/replication/replication-enable.ldif
476+ sed -i " s|{{ LDAP_REPLICATION_HOSTS }}|olcServerID: $(( LDAP_SERVER_ID_FROM + i )) ${! host} \n{{ LDAP_REPLICATION_HOSTS }}|g" ${CONTAINER_SERVICE_DIR} /slapd/assets/config/replication/replication-enable.ldif
477+ sed -i " s|{{ LDAP_REPLICATION_HOSTS_CONFIG_SYNC_REPL }}|olcSyncRepl: rid=$( printf %03d $(( L_LDAP_CONFIG_REPL_ID_FROM + i )) ) provider=${! host} ${LDAP_REPLICATION_CONFIG_SYNCPROV} \n{{ LDAP_REPLICATION_HOSTS_CONFIG_SYNC_REPL }}|g" ${CONTAINER_SERVICE_DIR} /slapd/assets/config/replication/replication-enable.ldif
478+ sed -i " s|{{ LDAP_REPLICATION_HOSTS_DB_SYNC_REPL }}|olcSyncRepl: rid=$( printf %03d $(( LDAP_DB_REPL_ID_FROM + i )) ) provider=${! host} ${LDAP_REPLICATION_DB_SYNCPROV} \n{{ LDAP_REPLICATION_HOSTS_DB_SYNC_REPL }}|g" ${CONTAINER_SERVICE_DIR} /slapd/assets/config/replication/replication-enable.ldif
474479
475- (( i ++ ))
480+ (( ++ i ))
476481 done
482+ cat ${CONTAINER_SERVICE_DIR} /slapd/assets/config/replication/replication-enable.ldif
477483
478484 get_ldap_base_dn
479485 sed -i " s|\$ LDAP_BASE_DN|$LDAP_BASE_DN |g" ${CONTAINER_SERVICE_DIR} /slapd/assets/config/replication/replication-enable.ldif
You can’t perform that action at this time.
0 commit comments