diff options
Diffstat (limited to 'run_onchange_after_deploy-etc.sh.tmpl')
| -rwxr-xr-x | run_onchange_after_deploy-etc.sh.tmpl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/run_onchange_after_deploy-etc.sh.tmpl b/run_onchange_after_deploy-etc.sh.tmpl index 5f97c70..45e5c26 100755 --- a/run_onchange_after_deploy-etc.sh.tmpl +++ b/run_onchange_after_deploy-etc.sh.tmpl @@ -1,3 +1,5 @@ +{{- $machineRole := default "host" (index . "machineRole") -}} +{{- if eq $machineRole "host" -}} #!/usr/bin/env dash # Deploy system-level configs from etc/ to /etc/. # chezmoi re-runs this script whenever any file under etc/ changes. @@ -64,3 +66,9 @@ target=$(readlink /usr/local/bin/sudo 2>/dev/null || true) if [ "$target" = /usr/bin/sudo-rs ]; then sudo rm -f /usr/local/bin/sudo fi +{{- else -}} +#!/usr/bin/env dash +# /etc deployment is host-only. +set -eu +exit 0 +{{- end }} |
