fix comparison, add exit

main
Ayush Mukherjee 3 years ago
parent c9cc24f2b5
commit 0da593017b

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

Loading…
Cancel
Save