Prune legacy setup service scaffolding

This commit is contained in:
ejclaw
2026-04-08 07:38:06 +09:00
parent 0e016395c6
commit 67cb2fa5fc
13 changed files with 22 additions and 619 deletions

View File

@@ -1,12 +1,6 @@
import { execFileSync } from 'child_process';
import os from 'os';
import { pathToFileURL } from 'url';
import {
detectLegacyServiceIssues,
formatLegacyServiceFailureMessage,
type LegacyServiceIssue,
} from './legacy-service-guard.js';
import { getServiceManager, isRoot } from './platform.js';
import { getConfiguredServiceNames } from './service-defs.js';
@@ -23,8 +17,6 @@ interface RestartStackDeps {
serviceManager?: ServiceManager;
direct?: boolean;
serviceId?: string | null;
legacyServiceIssues?: LegacyServiceIssue[];
homeDir?: string;
}
function restartStackServicesDirect(
@@ -70,24 +62,6 @@ export function restartStackServices(
);
}
const legacyServiceIssues =
deps.legacyServiceIssues ??
detectLegacyServiceIssues(
projectRoot,
serviceManager,
deps.homeDir ?? os.homedir(),
);
if (legacyServiceIssues.length > 0) {
throw new Error(
formatLegacyServiceFailureMessage({
projectRoot,
serviceManager,
services: legacyServiceIssues,
homeDir: deps.homeDir,
}),
);
}
const services = getConfiguredServiceNames(projectRoot);
const execImpl = deps.execFileSyncImpl ?? execFileSync;
const systemctlArgs = deps.runningAsRoot ?? isRoot() ? [] : ['--user'];