From 9b740d831414680dbc62b5c2b5169684b30694ef Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Thu, 18 Jan 2024 09:25:01 +0100 Subject: [PATCH] feat: allow to run setup outside of its directory --- scripts/setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/setup.sh b/scripts/setup.sh index 9b46540..a334962 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -12,6 +12,7 @@ test "$(id -u)" = "0" || exec sudo "${0}" group="qusal" file_roots="/srv/salt/${group}" +cd "${0%/*}"/.. ## Avoid having extra unwanted files. rm -rf "${file_roots}" cp -f minion.d/*.conf /etc/salt/minion.d/