From bc43b9b05ab712aeacc11a96b7f201a1e2eb12cf Mon Sep 17 00:00:00 2001 From: Gal Szkolnik Date: Thu, 8 May 2025 15:55:06 +0000 Subject: [PATCH] make sure systemctl exists doesn't exist inside docker --- .../_home/private_dot_config/sz.env/555_fix-kubectl.env | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chezmoi.roots/_home/private_dot_config/sz.env/555_fix-kubectl.env b/chezmoi.roots/_home/private_dot_config/sz.env/555_fix-kubectl.env index 7a7333a..38a2fd2 100644 --- a/chezmoi.roots/_home/private_dot_config/sz.env/555_fix-kubectl.env +++ b/chezmoi.roots/_home/private_dot_config/sz.env/555_fix-kubectl.env @@ -1,3 +1,4 @@ +{{- if lookPath "systemctl" -}} #!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"' if is_cmd szetup-kubectl4k3s && [ "$(systemctl is-active k3s.service)" = "active" ]; then @@ -7,3 +8,4 @@ if is_cmd szetup-kubectl4k3s && [ "$(systemctl is-active k3s.service)" = "active fi # vim: set ft=sh expandtab tabstop=4 shiftwidth=4: +{{- end -}}