Versions in this module Expand all Collapse all v1 v1.0.0 May 26, 2025 Changes in this version + var ErrBusFailure = errors.New("bus connection failure") — linux/amd64 + var ErrDoesNotExist = errors.New("unit does not exist") — linux/amd64 + var ErrExecTimeout = errors.New("command timed out") — linux/amd64 + var ErrInsufficientPermissions = errors.New("insufficient permissions") — linux/amd64 + var ErrLinked = errors.New("unit file linked") — linux/amd64 + var ErrMasked = errors.New("unit masked") — linux/amd64 + var ErrNoSudo = errors.New("sudo not in $PATH") — linux/amd64 + var ErrNotInstalled = errors.New("systemctl not in $PATH") — linux/amd64 + var ErrSudoPasswordEntryFail = errors.New(...) — linux/amd64 + var ErrUnitNotActive = errors.New("unit not active") — linux/amd64 + var ErrUnitNotLoaded = errors.New("unit not loaded") — linux/amd64 + var ErrUnspecified = errors.New("unknown error, please submit an issue at github.com/MatthiasKunnen/systemctl") — linux/amd64 + var ErrValueNotSet = errors.New("value not set") — linux/amd64 + func DaemonReload(ctx context.Context, opts Options) error — linux/amd64 + func Disable(ctx context.Context, unit string, opts Options) error — linux/amd64 + func Enable(ctx context.Context, unit string, opts Options) error — linux/amd64 + func GetMaskedUnits(ctx context.Context, opts Options) ([]string, error) — linux/amd64 + func GetMemoryUsage(ctx context.Context, unit string, opts Options) (int, error) — linux/amd64 + func GetNumRestarts(ctx context.Context, unit string, opts Options) (int, error) — linux/amd64 + func GetPID(ctx context.Context, unit string, opts Options) (int, error) — linux/amd64 + func GetSocketsForServiceUnit(ctx context.Context, unit string, opts Options) ([]string, error) — linux/amd64 + func GetStartTime(ctx context.Context, unit string, opts Options) (time.Time, error) — linux/amd64 + func IsActive(ctx context.Context, unit string, opts Options) (bool, error) — linux/amd64 + func IsEnabled(ctx context.Context, unit string, opts Options) (bool, error) — linux/amd64 + func IsFailed(ctx context.Context, unit string, opts Options) (bool, error) — linux/amd64 + func IsMasked(ctx context.Context, unit string, opts Options) (bool, error) — linux/amd64 + func IsRunning(ctx context.Context, unit string, opts Options) (bool, error) — linux/amd64 + func IsSystemd() (bool, error) — linux/amd64 + func Mask(ctx context.Context, unit string, opts Options) error — linux/amd64 + func Reenable(ctx context.Context, unit string, opts Options) error — linux/amd64 + func Restart(ctx context.Context, unit string, opts Options) error — linux/amd64 + func Show(ctx context.Context, unit string, property properties.Property, opts Options) (string, error) — linux/amd64 + func Start(ctx context.Context, unit string, opts Options) error — linux/amd64 + func Status(ctx context.Context, unit string, opts Options) (string, error) — linux/amd64 + func Stop(ctx context.Context, unit string, opts Options) error — linux/amd64 + func Unmask(ctx context.Context, unit string, opts Options) error — linux/amd64 + type Options struct — linux/amd64 + Sudo bool + SudoAskPass bool + SudoPass string + UserMode bool + type Unit struct — linux/amd64 + Active string + Description string + Load string + Name string + Sub string + func GetUnits(ctx context.Context, opts Options) ([]Unit, error)