|
|
@ -8,6 +8,11 @@
|
|
|
|
# exit on error
|
|
|
|
# exit on error
|
|
|
|
set -e
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$#" -eq 0 ]
|
|
|
|
|
|
|
|
echo "No options specified, exiting."
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# create directory if doesn't exist and set permissions
|
|
|
|
# create directory if doesn't exist and set permissions
|
|
|
|
mkdir -p /etc/consul.d/ && chown -R consul:consul /etc/consul.d/
|
|
|
|
mkdir -p /etc/consul.d/ && chown -R consul:consul /etc/consul.d/
|
|
|
|
|
|
|
|
|
|
|
@ -43,10 +48,6 @@ consultype="client"
|
|
|
|
bind_ip=null
|
|
|
|
bind_ip=null
|
|
|
|
server_ip=null
|
|
|
|
server_ip=null
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$#" -eq 0 ]
|
|
|
|
|
|
|
|
echo "No options specified, exiting."
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# read parameters
|
|
|
|
# read parameters
|
|
|
|
while [[ "$#" -gt 0 ]]
|
|
|
|
while [[ "$#" -gt 0 ]]
|
|
|
|
do
|
|
|
|
do
|
|
|
|