Added possibility to download consul without certificate check

This commit is contained in:
Marcin Grzejszczak
2016-03-09 13:24:13 +01:00
parent 7d1b9c2c07
commit b2e6f426d3

View File

@@ -2,11 +2,19 @@
CONSUL_VER="0.6.3"
CONSUL_ZIP="consul_${CONSUL_VER}_linux_amd64.zip"
IGNORE_CERTS="${IGNORE_CERTS:-no}"
# cleanup
rm "consul_*"
rm "consul"
# install consul
wget "https://releases.hashicorp.com/consul/${CONSUL_VER}/${CONSUL_ZIP}"
if [[ "${IGNORE_CERTS}" == "no" ]] ; then
echo "Downloading consul with certs verification"
wget "https://releases.hashicorp.com/consul/${CONSUL_VER}/${CONSUL_ZIP}"
else
echo "WARNING... Downloading consul WITHOUT certs verification"
wget "https://releases.hashicorp.com/consul/${CONSUL_VER}/${CONSUL_ZIP}" --no-check-certificate
fi
unzip ${CONSUL_ZIP}
# check
./consul --version
./consul --version