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