open-nomad/scripts/install_consul.sh
Michael Schurter a296a24215 Start consul in getting started vagrant
Sneak a version bump to consul in as well
2017-07-03 16:45:13 -07:00

21 lines
506 B
Bash
Executable file

#!/bin/bash
set -e
CONSUL_VERSION="0.8.5"
CURDIR=`pwd`
if [[ $(which consul >/dev/null && consul version | head -n 1 | cut -d ' ' -f 2) == "v$CONSUL_VERSION" ]]; then
echo "Consul v$CONSUL_VERSION already installed; Skipping"
exit
fi
echo Fetching Consul...
cd /tmp/
wget -q https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip -O consul.zip
echo Installing Consul...
unzip consul.zip
sudo chmod +x consul
sudo mv consul /usr/bin/consul
cd ${CURDIR}