diff --git a/src/daemon/launchd.ts b/src/daemon/launchd.ts index 5e9776f74..a59c9d330 100644 --- a/src/daemon/launchd.ts +++ b/src/daemon/launchd.ts @@ -410,6 +410,7 @@ export async function installLaunchAgent({ await execLaunchctl(["bootout", domain, plistPath]); await execLaunchctl(["unload", plistPath]); + await execLaunchctl(["enable", `${domain}/${label}`]); const boot = await execLaunchctl(["bootstrap", domain, plistPath]); if (boot.code !== 0) { throw new Error(`launchctl bootstrap failed: ${boot.stderr || boot.stdout}`.trim());