From: sunil unnava Date: Thu, 29 Nov 2018 21:03:46 +0000 (-0500) Subject: zookeeper start script changes X-Git-Tag: 1.0.0~2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=183bf873f13f967e037c00f40bfbf6ab7e9437fa;p=dmaap%2Fzookeeper.git zookeeper start script changes Issue-ID: DMAAP-888 Change-Id: I9534db830271636c574c920e03c2e71ed42a8e87 Signed-off-by: sunil unnava --- diff --git a/src/main/docker/scripts/start-zookeeper.sh b/src/main/docker/scripts/start-zookeeper.sh index 148ecc8..6feb538 100644 --- a/src/main/docker/scripts/start-zookeeper.sh +++ b/src/main/docker/scripts/start-zookeeper.sh @@ -36,9 +36,8 @@ function print_servers() { function validate_env() { echo "Validating environment" - - if[ $HOST =~ (.*)-([0-9]+)$ ]]; then + if [[ $HOST =~ (.*)-([0-9]+)$ ]]; then NAME=${BASH_REMATCH[1]} ORD=${BASH_REMATCH[2]} MY_ID=$((ORD+1)) @@ -46,6 +45,7 @@ function validate_env() { else echo "Failed to extract ordinal from hostname $HOST" fi + echo "ZK_REPLICAS=$ZK_REPLICAS"