github.com/rohankumardubey/nomad@v0.11.8/scripts/vagrant-linux-priv-vault.sh (about) 1 #!/usr/bin/env bash 2 3 set -o errexit 4 5 VERSION=0.10.2 6 DOWNLOAD=https://releases.hashicorp.com/vault/${VERSION}/vault_${VERSION}_linux_amd64.zip 7 8 function install_vault() { 9 if [[ -e /usr/bin/vault ]] ; then 10 if [ "v${VERSION}" = "$(vault version | head -n1 | awk '{print $2}')" ] ; then 11 return 12 fi 13 fi 14 15 curl -sSL --fail -o /tmp/vault.zip ${DOWNLOAD} 16 17 unzip -d /tmp /tmp/vault.zip 18 mv /tmp/vault /usr/bin/vault 19 chmod +x /usr/bin/vault 20 } 21 22 install_vault