Skip to content

Commit 03fbe84

Browse files
shynomevharseko
authored andcommitted
fix docker replicate.sh errors: syntax error and PATH env error (#64)
1 parent fffa9d4 commit 03fbe84

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# If the service is called
88

99
MYHOSTNAME=${MYHOSTNAME:-`hostname -f`}
10+
export PATH=/opt/opendj/bin:$PATH
1011

1112
echo "Setting up replication from $MYHOSTNAME to $MASTER_SERVER"
1213

@@ -28,7 +29,7 @@ echo "Will sleep for a bit to ensure master is up"
2829

2930
sleep 5
3031

31-
if [ "$OPENDJ_REPLICATION_TYPE" == "simple" ] then
32+
if [ "$OPENDJ_REPLICATION_TYPE" == "simple" ]; then
3233
echo "Enabling Standart Replication..."
3334
/opt/opendj/bin/dsreplication enable --host1 $MYHOSTNAME --port1 4444 \
3435
--bindDN1 "$ROOT_USER_DN" \
@@ -44,7 +45,7 @@ if [ "$OPENDJ_REPLICATION_TYPE" == "simple" ] then
4445
--hostSource $MYHOSTNAME --portSource 4444 \
4546
--hostDestination $MASTER_SERVER --portDestination 4444 -X -n
4647

47-
elif [ "$OPENDJ_REPLICATION_TYPE" == "srs" ] then
48+
elif [ "$OPENDJ_REPLICATION_TYPE" == "srs" ]; then
4849
echo "Enabling Standalone Replication Servers..."
4950
dsreplication enable \
5051
--adminUID admin \
@@ -76,7 +77,7 @@ elif [ "$OPENDJ_REPLICATION_TYPE" == "srs" ] then
7677
--trustAll \
7778
--no-prompt
7879

79-
elif [ "$OPENDJ_REPLICATION_TYPE" == "sdsr" ] then
80+
elif [ "$OPENDJ_REPLICATION_TYPE" == "sdsr" ]; then
8081
echo "Enabling Standalone Directory Server Replicas...."
8182
dsreplication \
8283
enable \
@@ -109,7 +110,7 @@ elif [ "$OPENDJ_REPLICATION_TYPE" == "sdsr" ] then
109110
--trustAll \
110111
--no-prompt
111112

112-
elif [ "$OPENDJ_REPLICATION_TYPE" == "rg" ] then
113+
elif [ "$OPENDJ_REPLICATION_TYPE" == "rg" ]; then
113114
echo "Enabling Replication Groups..."
114115

115116
dsconfig \

0 commit comments

Comments
 (0)