Documentation
¶
Overview ¶
Package service handles host service installation: launchd on macOS, systemd user units on Linux. Used by `dejima service install/uninstall`.
Package service handles installing dejimad as a host service (launchd on macOS, systemd user units on Linux). The CLI's `dejima service install` command is a thin wrapper over this package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
// Install registers dejimad with the host service manager. args are the
// extra command-line arguments baked into the service definition (e.g.
// ["--tcp", ":7273"] to expose the Tailscale-pinned TCP listener).
Install(binaryPath string, args []string) error
Uninstall() error
Status() (string, error)
// Restart bounces the running daemon (e.g. after `make install` or a
// release upgrade replaced the binary).
Restart() error
}
Manager is the OS-specific service manager.
type Supervision ¶
type Supervision struct {
Managed bool // a service manager currently has dejimad loaded
Mode string // launchd-system | launchd-gui | launchd-user | systemd-user | none | unknown
RebootDurable bool // comes back after a reboot with no interactive login
Summary string // human one-liner for the report row
Concern string // non-empty → a reboot-survival caveat worth a WARN
}
Supervision describes how (and whether) dejimad is supervised by the host service manager, and whether that arrangement survives a reboot. It answers the question `dejima doctor` couldn't before: not just "is the daemon up?" but "will it come back on its own?".
func Detect ¶
func Detect() Supervision
Detect inspects the host service manager for a dejimad supervision arrangement. Best-effort: never errors; returns Mode "none" when nothing is found and "unknown" on an unsupported OS.