mirror of
https://github.com/ben-grande/qusal.git
synced 2025-04-14 12:43:17 -04:00
14 lines
357 B
Bash
Executable File
14 lines
357 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
test "$(hostname)" = "dom0" || { echo "Must be run from dom0" >&2; exit 1; }
|
|
test "$(id -u)" = "0" || exec sudo "${0}"
|
|
|
|
group="qusal"
|
|
file_roots="/srv/salt/${group}"
|
|
## Avoid having extra unwanted files.
|
|
rm -rf "${file_roots}"
|
|
cp -f minion.d/"${group}".conf /etc/salt/minion.d/
|
|
mkdir -p "${file_roots}"
|
|
cp -r "${group}"/* "${file_roots}"
|