open-nomad/scripts/install_vault.sh

21 lines
494 B
Bash
Raw Normal View History

2016-08-16 17:15:06 +00:00
#!/bin/bash
set -e
2016-08-16 17:15:06 +00:00
2017-03-27 17:10:42 +00:00
VAULT_VERSION="0.7.0"
2016-08-16 17:15:06 +00:00
CURDIR=`pwd`
2017-01-28 00:07:14 +00:00
if [[ $(which vault >/dev/null && vault version | cut -d ' ' -f 2) == "v$VAULT_VERSION" ]]; then
echo "Vault v$VAULT_VERSION already installed; Skipping"
exit
fi
2016-08-16 17:15:06 +00:00
echo Fetching Vault ${VAULT_VERSION}...
cd /tmp/
wget -q https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip -O vault.zip
2016-08-16 17:15:06 +00:00
echo Installing Vault...
unzip vault.zip
sudo chmod +x vault
sudo mv vault /usr/bin/vault
cd ${CURDIR}