fix(daemon): resolve TS and lint errors in systemd.ts
This commit is contained in:
parent
ddff60d0d6
commit
4691064368
@ -5,7 +5,6 @@ import { promisify } from "node:util";
|
|||||||
import { colorize, isRich, theme } from "../terminal/theme.js";
|
import { colorize, isRich, theme } from "../terminal/theme.js";
|
||||||
import {
|
import {
|
||||||
formatGatewayServiceDescription,
|
formatGatewayServiceDescription,
|
||||||
LEGACY_GATEWAY_SYSTEMD_SERVICE_NAMES,
|
|
||||||
resolveGatewaySystemdServiceName,
|
resolveGatewaySystemdServiceName,
|
||||||
} from "./constants.js";
|
} from "./constants.js";
|
||||||
import { parseKeyValueOutput } from "./runtime-parse.js";
|
import { parseKeyValueOutput } from "./runtime-parse.js";
|
||||||
@ -62,6 +61,21 @@ export function resolveSystemdUserUnitPath(env: Record<string, string | undefine
|
|||||||
return resolveSystemdUnitPath(env);
|
return resolveSystemdUnitPath(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function findLegacySystemdUnits(
|
||||||
|
_env: Record<string, string | undefined>,
|
||||||
|
): Promise<string[]> {
|
||||||
|
// TODO: Implement search for legacy unit names
|
||||||
|
return Promise.resolve([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function uninstallLegacySystemdUnits(
|
||||||
|
_env: Record<string, string | undefined>,
|
||||||
|
_units: string[],
|
||||||
|
): Promise<void> {
|
||||||
|
// TODO: Implement removal of legacy units
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
export { enableSystemdUserLinger, readSystemdUserLingerStatus };
|
export { enableSystemdUserLinger, readSystemdUserLingerStatus };
|
||||||
export type { SystemdUserLingerStatus };
|
export type { SystemdUserLingerStatus };
|
||||||
|
|
||||||
@ -379,8 +393,8 @@ export async function readSystemdServiceRuntime(
|
|||||||
state: parsed.activeState,
|
state: parsed.activeState,
|
||||||
subState: parsed.subState,
|
subState: parsed.subState,
|
||||||
pid: parsed.mainPid,
|
pid: parsed.mainPid,
|
||||||
exitStatus: parsed.execMainStatus,
|
lastExitStatus: parsed.execMainStatus,
|
||||||
exitCode: parsed.execMainCode,
|
lastRunResult: parsed.execMainCode,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,8 +419,8 @@ export async function readSystemdServiceRuntime(
|
|||||||
state: parsed.activeState,
|
state: parsed.activeState,
|
||||||
subState: parsed.subState,
|
subState: parsed.subState,
|
||||||
pid: parsed.mainPid,
|
pid: parsed.mainPid,
|
||||||
exitStatus: parsed.execMainStatus,
|
lastExitStatus: parsed.execMainStatus,
|
||||||
exitCode: parsed.execMainCode,
|
lastRunResult: parsed.execMainCode,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user