MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / launchd_start_command_plan

Function launchd_start_command_plan

src/daemon/service.rs:691–708  ·  view source on GitHub ↗

Commands that (re)start the launchd agent. Booting the service out first (tolerating "not loaded") makes the sequence idempotent, and enabling before bootstrap clears any persisted disabled state so the bootstrap cannot be rejected.

(
    domain: &str,
    target: &str,
    service_path: &Path,
)

Source from the content-addressed store, hash-verified

689/// before bootstrap clears any persisted disabled state so the bootstrap
690/// cannot be rejected.
691fn launchd_start_command_plan(
692 domain: &str,
693 target: &str,
694 service_path: &Path,
695) -> Vec<LaunchdCommand> {
696 vec![
697 LaunchdCommand::new(
698 &["bootout", target],
699 LaunchctlFailureMode::TolerateNotLoaded,
700 ),
701 LaunchdCommand::new(&["enable", target], LaunchctlFailureMode::Fail),
702 LaunchdCommand::new(
703 &["bootstrap", domain, &service_path.display().to_string()],
704 LaunchctlFailureMode::Fail,
705 ),
706 LaunchdCommand::new(&["kickstart", "-k", target], LaunchctlFailureMode::Fail),
707 ]
708}
709
710fn launchd_uninstall_command_plan(target: &str) -> Vec<LaunchdCommand> {
711 vec![

Callers 1

launchd_startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected