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

Function launchd_install

src/daemon/service.rs:777–787  ·  view source on GitHub ↗
(service_path: &Path, start: bool, socket_path: &Path)

Source from the content-addressed store, hash-verified

775}
776
777fn launchd_install(service_path: &Path, start: bool, socket_path: &Path) -> Result<()> {
778 ensure_launchd_runtime_dirs()?;
779 let target = launchd_service_target()?;
780 if !start {
781 // launchd bootstraps every plist in ~/Library/LaunchAgents at login,
782 // so persist a disabled state to keep --no-start meaning "do not run".
783 run_launchctl(&["disable", &target])?;
784 return Ok(());
785 }
786 launchd_start(&target, service_path, socket_path)
787}
788
789fn launchd_refresh(service_path: &Path, socket_path: &Path) -> Result<()> {
790 ensure_launchd_runtime_dirs()?;

Callers 1

installMethod · 0.85

Calls 4

launchd_service_targetFunction · 0.85
run_launchctlFunction · 0.85
launchd_startFunction · 0.85

Tested by

no test coverage detected