systemd

package
v1.11.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(exec executor.Executor, log *progress.Logger) error

Install configures a systemd user timer for periodic scanning. If already installed, upgrades by removing and re-creating the units.

Only `--user` units are supported. Root install would need a system unit at /etc/systemd/system/, which has different lifecycle and privilege requirements (the timer fires as root, the scanner expects per-user search dirs and HOME). Reject early with a clear message instead of failing opaquely on `systemctl --user` calls that root has no session for.

func StartTimer added in v1.11.3

func StartTimer(exec executor.Executor, log *progress.Logger) error

StartTimer activates the timer that Install enabled. Split out from Install so the install command can run its inline post-install telemetry first (and release the singleton lock) before the timer is allowed to fire its own first invocation. With Persistent=true on the timer unit, this start will trigger one immediate catch-up scan via the service unit — that's fine because the inline scan has already completed.

func TimerUnitPath added in v1.11.4

func TimerUnitPath() string

TimerUnitPath returns the per-user systemd timer unit path installed for periodic scanning. Exported so the telemetry package's invocation detector can stat for an installed footprint without re-deriving the path. Returns empty when the home directory cannot be resolved.

func Uninstall

func Uninstall(exec executor.Executor, log *progress.Logger) error

Uninstall removes the systemd user timer and service units.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL