runtime: unify final delivery and startup preconditions

This commit is contained in:
ejclaw
2026-04-11 13:48:54 +09:00
parent dcf18b8797
commit a1617b7456
8 changed files with 118 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
import path from 'path';
import { STARTUP_PRECONDITION_EXIT_CODE } from '../src/startup-preconditions.js';
import type { ServiceDef } from './service-defs.js';
export function buildRuntimePathEnv(nodePath: string, homeDir: string): string {
@@ -111,6 +112,7 @@ ExecStart=${nodePath} ${projectRoot}/dist/index.js
WorkingDirectory=${projectRoot}
Restart=always
RestartSec=5
RestartPreventExitStatus=${STARTUP_PRECONDITION_EXIT_CODE}
${envLines.join('\n')}
StandardOutput=append:${projectRoot}/logs/${def.logName}.log
StandardError=append:${projectRoot}/logs/${def.logName}.error.log