summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/docker/scripts/start-zookeeper.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/docker/scripts/start-zookeeper.sh b/src/main/docker/scripts/start-zookeeper.sh
index 6feb538..e2f3f09 100644
--- a/src/main/docker/scripts/start-zookeeper.sh
+++ b/src/main/docker/scripts/start-zookeeper.sh
@@ -116,11 +116,12 @@ function create_data_dirs() {
mkdir -p $ZK_LOG_DIR
chown -R $ZK_USER:$ZK_USER $ZK_LOG_DIR
fi
-
- if [ $ZK_REPLICAS -gt 1 ] && [ ! -f $ID_FILE]; then
+
+ if [ ! -f $ID_FILE ] && [ $ZK_REPLICAS -gt 1 ]; then
echo $MY_ID >> $ID_FILE
fi
+
echo "Created ZooKeeper data directories and set permissions in $ZK_DATA_DIR"
}