diff --git a/consul-bootstrap.sh b/consul-bootstrap.sh index c44acd4..900edf7 100755 --- a/consul-bootstrap.sh +++ b/consul-bootstrap.sh @@ -40,8 +40,12 @@ systemctl daemon-reload # parameter setup consultype="client" -bind_ip="" -server_ip="" +bind_ip=null +server_ip=null + +if [ "$#" -eq 0 ] + echo "No options specified, exiting." + exit 1 # read parameters while [[ "$#" -gt 0 ]] @@ -62,7 +66,7 @@ done # write config file -if [ $consultype -eq "client" ] +if [ $consultype == "client" ] then cat >> /etc/consul.d/consul.hcl <