From 1bff06a3a9eaf9ffec20c414ef093c93663f8a49 Mon Sep 17 00:00:00 2001 From: Ayush Mukherjee Date: Tue, 7 Dec 2021 23:37:56 +0530 Subject: [PATCH] fix semantics --- consul-bootstrap.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/consul-bootstrap.sh b/consul-bootstrap.sh index 900edf7..cda1f2c 100755 --- a/consul-bootstrap.sh +++ b/consul-bootstrap.sh @@ -8,6 +8,11 @@ # exit on error set -e +if [ "$#" -eq 0 ] + echo "No options specified, exiting." + exit 1 +fi + # create directory if doesn't exist and set permissions mkdir -p /etc/consul.d/ && chown -R consul:consul /etc/consul.d/ @@ -43,10 +48,6 @@ consultype="client" bind_ip=null server_ip=null -if [ "$#" -eq 0 ] - echo "No options specified, exiting." - exit 1 - # read parameters while [[ "$#" -gt 0 ]] do