Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
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 ServiceUnitName ¶ added in v1.13.0
func ServiceUnitName() string
ServiceUnitName returns the systemd user service unit name (e.g. for `systemctl --user is-active`). Exported so the telemetry invocation detector can probe whether the timer-launched service is currently running.
func StartTimer ¶ added in v1.11.3
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 may 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.
Types ¶
This section is empty.