Skip to content

Commit 8ffab93

Browse files
authored
Docker: Fix issues with quoting params (#537)
1 parent af8a89b commit 8ffab93

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

opendj-packages/opendj-docker/bootstrap/replicate.sh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,35 +36,35 @@ if [ "$OPENDJ_REPLICATION_TYPE" == "simple" ]; then
3636
--host1 $MASTER_SERVER \
3737
--port1 4444 \
3838
--bindDN1 "$ROOT_USER_DN" \
39-
--bindPassword1 $ROOT_PASSWORD --replicationPort1 8989 \
39+
--bindPassword1 "$ROOT_PASSWORD" --replicationPort1 8989 \
4040
--host2 $MYHOSTNAME --port2 4444 --bindDN2 "$ROOT_USER_DN" \
41-
--bindPassword2 $ROOT_PASSWORD --replicationPort2 8989 \
42-
--adminUID admin --adminPassword $ROOT_PASSWORD \
43-
--baseDN $BASE_DN -X -n
41+
--bindPassword2 "$ROOT_PASSWORD" --replicationPort2 8989 \
42+
--adminUID admin --adminPassword "$ROOT_PASSWORD" \
43+
--baseDN "$BASE_DN" -X -n
4444

4545
echo "initializing replication"
4646

4747
# replicating data in MASTER_SERVER to MYHOSTNAME:
48-
/opt/opendj/bin/dsreplication initialize --baseDN $BASE_DN \
49-
--adminUID admin --adminPassword $ROOT_PASSWORD \
48+
/opt/opendj/bin/dsreplication initialize --baseDN "$BASE_DN" \
49+
--adminUID admin --adminPassword "$ROOT_PASSWORD" \
5050
--hostSource $MASTER_SERVER --portSource 4444 \
5151
--hostDestination $MYHOSTNAME --portDestination 4444 -X -n
5252

5353
elif [ "$OPENDJ_REPLICATION_TYPE" == "srs" ]; then
5454
echo "Enabling Standalone Replication Servers..."
5555
dsreplication enable \
5656
--adminUID admin \
57-
--adminPassword $ROOT_PASSWORD \
58-
--baseDN $BASE_DN \
57+
--adminPassword "$ROOT_PASSWORD" \
58+
--baseDN "$BASE_DN" \
5959
--host1 $MYHOSTNAME \
6060
--port1 4444 \
6161
--bindDN1 "$ROOT_USER_DN" \
62-
--bindPassword1 $ROOT_PASSWORD \
62+
--bindPassword1 "$ROOT_PASSWORD" \
6363
--noReplicationServer1 \
6464
--host2 $MASTER_SERVER \
6565
--port2 4444 \
6666
--bindDN2 "$ROOT_USER_DN" \
67-
--bindPassword2 $ROOT_PASSWORD \
67+
--bindPassword2 "$ROOT_PASSWORD" \
6868
--replicationPort2 8989 \
6969
--onlyReplicationServer2 \
7070
--trustAll \
@@ -75,8 +75,8 @@ elif [ "$OPENDJ_REPLICATION_TYPE" == "srs" ]; then
7575
dsreplication \
7676
initialize-all \
7777
--adminUID admin \
78-
--adminPassword $ROOT_PASSWORD \
79-
--baseDN $BASE_DN \
78+
--adminPassword "$ROOT_PASSWORD" \
79+
--baseDN "$BASE_DN" \
8080
--hostname $MYHOSTNAME \
8181
--port 4444 \
8282
--trustAll \
@@ -87,16 +87,16 @@ elif [ "$OPENDJ_REPLICATION_TYPE" == "sdsr" ]; then
8787
dsreplication \
8888
enable \
8989
--adminUID admin \
90-
--adminPassword $ROOT_PASSWORD \
91-
--baseDN $BASE_DN \
90+
--adminPassword "$ROOT_PASSWORD" \
91+
--baseDN "$BASE_DN" \
9292
--host1 $MASTER_SERVER \
9393
--port1 4444 \
9494
--bindDN1 "$ROOT_USER_DN" \
95-
--bindPassword1 $ROOT_PASSWORD \
95+
--bindPassword1 "$ROOT_PASSWORD" \
9696
--host2 $MYHOSTNAME \
9797
--port2 4444 \
9898
--bindDN2 "$ROOT_USER_DN" \
99-
--bindPassword2 $ROOT_PASSWORD \
99+
--bindPassword2 "$ROOT_PASSWORD" \
100100
--noReplicationServer2 \
101101
--trustAll \
102102
--no-prompt
@@ -106,8 +106,8 @@ elif [ "$OPENDJ_REPLICATION_TYPE" == "sdsr" ]; then
106106
dsreplication \
107107
initialize \
108108
--adminUID admin \
109-
--adminPassword $ROOT_PASSWORD \
110-
--baseDN $BASE_DN \
109+
--adminPassword "$ROOT_PASSWORD" \
110+
--baseDN "$BASE_DN" \
111111
--hostSource $MASTER_SERVER \
112112
--portSource 4444 \
113113
--hostDestination $MYHOSTNAME \
@@ -123,9 +123,9 @@ elif [ "$OPENDJ_REPLICATION_TYPE" == "rg" ]; then
123123
--port 4444 \
124124
--hostname $MYHOSTNAME \
125125
--bindDN "$ROOT_USER_DN" \
126-
--bindPassword $ROOT_PASSWORD \
126+
--bindPassword "$ROOT_PASSWORD" \
127127
--provider-name "Multimaster Synchronization" \
128-
--domain-name $BASE_DN \
128+
--domain-name "$BASE_DN" \
129129
--set group-id:$OPENDJ_REPLICATION_GROUP_ID \
130130
--trustAll \
131131
--no-prompt
@@ -135,7 +135,7 @@ elif [ "$OPENDJ_REPLICATION_TYPE" == "rg" ]; then
135135
--port 4444 \
136136
--hostname $MASTER_SERVER \
137137
--bindDN "$ROOT_USER_DN" \
138-
--bindPassword $ROOT_PASSWORD \
138+
--bindPassword "$ROOT_PASSWORD" \
139139
--provider-name "Multimaster Synchronization" \
140140
--set group-id:$OPENDJ_REPLICATION_GROUP_ID \
141141
--trustAll \

0 commit comments

Comments
 (0)