vaguerent/plugins/provisioners/salt/bootstrap-salt.sh
Brian Cain 4fd9d522f6
Merge pull request #9432 from blueyed/curl-s
salt: bootstrap-salt.sh: use -s with curl
2018-09-17 11:13:21 -07:00

21 lines
816 B
Bash
Executable File

#!/bin/sh -
cd `mktemp -d`
# We just download the bootstrap script by default and execute that.
if [ -x /usr/bin/fetch ]; then
/usr/bin/fetch -o bootstrap-salt.sh https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh
elif [ -x /usr/bin/curl ]; then
/usr/bin/curl --silent --show-error -L -O https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh
elif [ -x /usr/bin/wget ]; then
/usr/bin/wget -O bootstrap-salt.sh https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh
else
python -c 'import urllib; urllib.urlretrieve("https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh", "bootstrap-salt.sh")'
fi
if [ -e bootstrap-salt.sh ]; then
sh bootstrap-salt.sh "$@"
else
exit 1
fi