diff options
Diffstat (limited to 'bootstrap/run_salt.sh')
| -rwxr-xr-x | bootstrap/run_salt.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bootstrap/run_salt.sh b/bootstrap/run_salt.sh new file mode 100755 index 0000000..47a9a4f --- /dev/null +++ b/bootstrap/run_salt.sh @@ -0,0 +1,24 @@ +#!/bin/bash -e + +working_dir="${1}" +build_basedir="${2}" +local_build="${3}" +python=$(which python2 || false) + +salt_running_p() { + ps -ef | grep -F "salt-call" | grep -v "grep" + return ${?} +} + +while salt_running_p; do + sleep 5 +done + +${python} $(which salt-call) \ + --local \ + --pillar-root=${working_dir}/pillar \ + --file-root=${working_dir}/salt \ + state.highstate \ + pillar="$($(dirname ${0})/pillar_config.rb --build-basedir=${build_basedir} --local-build=${local_build})" + +exit 0 |
