fix comparison, add exit

main
Ayush Mukherjee 3 years ago
parent c9cc24f2b5
commit 0da593017b

@ -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 <<EOF

Loading…
Cancel
Save