make sure systemctl exists

doesn't exist inside docker
This commit is contained in:
Gal Szkolnik 2025-05-08 15:55:06 +00:00
parent c768ee7ad2
commit bc43b9b05a
1 changed files with 2 additions and 0 deletions

View File

@ -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 -}}