export interface SystemdResult { readonly code: number; readonly stdout: string; readonly stderr: string; } export interface SystemdDeps { readonly run?: (command: string, args: readonly string[]) => Promise; readonly journal?: (args: readonly string[]) => Promise; readonly isAlive?: (pid: number) => boolean; readonly homeDir?: string; readonly configDir?: string; readonly now?: () => number; readonly sleep?: (ms: number) => Promise; readonly stdout?: { write(text: string): unknown; }; readonly stderr?: { write(text: string): unknown; }; } export interface SystemdDefinition { readonly identity: string; readonly cwd: string; readonly argv: readonly string[]; readonly environment: Readonly>; } export interface SystemdService { readonly loadState: string; readonly activeState: string; readonly subState: string; readonly pid: number; readonly startedAt: string; readonly enabled: boolean; readonly fragmentPath: string; } export declare const SYSTEMD_WEB_IDENTITY = "web"; export declare class SystemdUserManagerUnavailableError extends Error { readonly name = "SystemdUserManagerUnavailableError"; } export declare function isSystemdUserManagerUnavailable(error: unknown): boolean; export declare function systemdUnitName(identity: string): string; export declare function systemdUnitPath(identity: string, deps?: SystemdDeps): string; export declare function renderSystemdUnit(definition: SystemdDefinition): string; export declare function runSystemdTool(command: string, args: readonly string[]): Promise; export declare function inspectSystemd(identity: string, deps?: SystemdDeps): Promise; export declare function readSystemdDefinition(identity: string, deps?: SystemdDeps): Promise; export declare function withSystemdLock(identity: string, deps: SystemdDeps, action: () => Promise): Promise; export declare function stopSystemd(identity: string, deps?: SystemdDeps): Promise; export declare function startSystemd(definition: SystemdDefinition, restart: boolean, ready: (service: SystemdService) => Promise, deps?: SystemdDeps): Promise; export declare function systemdLogs(identity: string, follow: boolean, lines: number, deps?: SystemdDeps): Promise; //# sourceMappingURL=systemd.d.ts.map