diff --git a/update.sh b/update.sh index 8b5ae8f..cc89644 100755 --- a/update.sh +++ b/update.sh @@ -3,6 +3,8 @@ set -aeou pipefail +SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + function printHelp(){ cat << EOF Usage ${0##*/} [options..] @@ -87,7 +89,7 @@ function check_prerequisites(){ } function do_salt_call(){ - local salt="sudo salt-call --local --file-root $HOME/tle/salt/states --pillar-root $HOME/tle/salt/pillars" + local salt="sudo salt-call --local --file-root $SCRIPTDIR/salt/states --pillar-root $SCRIPTDIR/salt/pillars" new_log "Running salt high state" if asktobreak;then return