|
|
|
@ -8,10 +8,15 @@
|
|
|
|
|
# exit on error
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
if [ "$#" -eq 0 ]
|
|
|
|
|
then
|
|
|
|
|
if [ "$#" -eq 0 ]; then
|
|
|
|
|
echo "No options specified, exiting."
|
|
|
|
|
exit 1
|
|
|
|
|
elif [ "$#" -eq 1 ] && [ "$1" == "-h" ]; then
|
|
|
|
|
echo "HashiCorp Consul Bootstrap Script. Provide:"
|
|
|
|
|
echo "-server for server install,"
|
|
|
|
|
echo "-bind for the bind interface address,"
|
|
|
|
|
echo "-server-ip for the server ip address."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# create directory if doesn't exist and set permissions
|
|
|
|
|