github.com/manicqin/nomad@v0.9.5/scripts/vagrant-linux-priv-cni.sh (about) 1 #!/usr/bin/env bash 2 3 set -o errexit 4 5 VERSION="v0.8.4" 6 DOWNLOAD=https://github.com/containernetworking/plugins/releases/download/${VERSION}/cni-plugins-linux-amd64-${VERSION}.tgz 7 TARGET_DIR=/opt/cni/bin 8 9 function install_cni() { 10 mkdir -p ${TARGET_DIR} 11 if [[ -e ${TARGET_DIR}/${VERSION} ]] ; then 12 return 13 fi 14 15 wget -q -O /tmp/cni-plugins.tar.gz ${DOWNLOAD} 16 tar -xf /tmp/cni-plugins.tar.gz -C ${TARGET_DIR} 17 touch ${TARGET_DIR}/${VERSION} 18 } 19 20 install_cni