Lines 2400-2440javascript
2401 const info = refreshClientServiceUnitForUpdate();
2402 print.line(` refresh-unit: ${info.platform} supervisor definition rewritten at ${info.unitPath}\n`);
2404 const msg = err instanceof Error ? err.message : String(err);
2405 print.line(` refresh-unit: failed to rewrite supervisor definition: ${msg}\n`);
2411//#region src/commands/daemon/restart.ts
2412function registerDaemonRestartCommand(daemon) {
2413 daemon.command("restart").description("Restart the background service").action(() => {
2414 if (!isServiceSupported()) {
2415 if (process.platform === "win32") {
2416 print.line("\n Service control is not supported on Windows.\n");
2417 print.line(" First Tree runs inline on this platform.\n\n");
2418 print.line(" If you are onboarding and need to refresh detected agents:\n");
2419 print.line(` ${channelConfig.binName} daemon probe\n\n`);
2420 print.line(" If you need to restart the inline daemon:\n");
2421 print.line(` stop the PowerShell running \`${channelConfig.binName} daemon start\` with Ctrl+C,\n`);
2422 print.line(` then run \`${channelConfig.binName} daemon start\` again.\n\n`);
2424 print.line(`\n Service control is not supported on ${process.platform}.\n`);
2425 print.line(" First Tree runs inline on this platform.\n\n");
2426 print.line(" If you are onboarding and need to refresh detected agents:\n");
2427 print.line(` ${channelConfig.binName} daemon probe\n\n`);
2428 print.line(" If you need to restart the inline daemon:\n");
2429 print.line(` stop the terminal running \`${channelConfig.binName} daemon start\` with Ctrl+C,\n`);
2430 print.line(` then run \`${channelConfig.binName} daemon start\` again.\n\n`);
2434 if (getClientServiceStatus().state === "not-installed") {
2435 print.line("\n No background service installed.\n");
2436 print.line(` Run \`${channelConfig.binName} login <code>\` first.\n\n`);
2439 const res = restartClientService();