File tree 2 files changed +13
-7
lines changed
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
3
3
4
4
.PHONY : build build-nocache test tag-latest push push-latest release git-tag-version
5
5
Original file line number Diff line number Diff line change @@ -465,15 +465,21 @@ EOF
465
465
log-helper info " Add replication config..."
466
466
disableReplication || true
467
467
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
469
474
for host in $( complex-bash-env iterate LDAP_REPLICATION_HOSTS)
470
475
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
474
479
475
- (( i ++ ))
480
+ (( ++ i ))
476
481
done
482
+ cat ${CONTAINER_SERVICE_DIR} /slapd/assets/config/replication/replication-enable.ldif
477
483
478
484
get_ldap_base_dn
479
485
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