Skip to main content

Module service

Module service 

Source
Expand description

OS service install/uninstall. Linux: systemd –user. macOS: launchd plist template (written but not loaded — operator runs launchctl load). Windows: schtasks template (written but not registered — operator runs the printed command).

All system side-effects (Command::status, fs writes) flow through the ServiceOps trait so the public install/uninstall functions can be unit-tested without touching the real OS.

Structs§

RealOps
Real, system-touching implementation used by the CLI.

Traits§

ServiceOps
Abstraction over the side-effecting parts of install/uninstall so the install logic itself is fully unit-testable.

Functions§

install
install_with
Write the unit file using the supplied ops and print manual activation instructions if the platform tool isn’t available. Public-but-pub so tests in tests/ can drive it with a fake ops.
uninstall
uninstall_with