Add unit reload support

This commit is contained in:
2026-03-09 16:43:24 -04:00
parent 038fbe1a17
commit da8db0d3a3
5 changed files with 85 additions and 0 deletions

View File

@@ -115,6 +115,12 @@ func restart(ctx context.Context, unit string, opts Options, args ...string) err
return err
}
func reload(ctx context.Context, unit string, opts Options, args ...string) error {
a := prepareArgs("reload", opts, append([]string{unit}, args...)...)
_, _, _, err := execute(ctx, a)
return err
}
func show(ctx context.Context, unit string, property properties.Property, opts Options, args ...string) (string, error) {
extra := append([]string{unit, "--property", string(property)}, args...)
a := prepareArgs("show", opts, extra...)