mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Don't start the windows service - the msi already does this
This commit is contained in:
parent
7d55c5453b
commit
626bb0d2b9
1 changed files with 0 additions and 32 deletions
|
|
@ -35,16 +35,9 @@ export async function installOnWindows() {
|
|||
await stopServiceIfRunning();
|
||||
await uninstallIfInstalled();
|
||||
|
||||
// Wait a moment for uninstall to complete
|
||||
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||
|
||||
ui.writeInformation("⚙️ Installing SafeChain Ultimate...");
|
||||
await runMsiInstaller(msiPath);
|
||||
|
||||
ui.emptyLine();
|
||||
ui.writeInformation("🚀 Starting SafeChain Ultimate service...");
|
||||
await startService();
|
||||
|
||||
ui.emptyLine();
|
||||
ui.writeInformation(
|
||||
"✅ SafeChain Ultimate installed and started successfully!",
|
||||
|
|
@ -132,31 +125,6 @@ async function stopServiceIfRunning() {
|
|||
}
|
||||
}
|
||||
|
||||
async function startService() {
|
||||
ui.writeVerbose(
|
||||
`Checking service status: sc query "${WINDOWS_SERVICE_NAME}"`,
|
||||
);
|
||||
const queryResult = await safeSpawn("sc", ["query", WINDOWS_SERVICE_NAME], {
|
||||
stdio: "pipe",
|
||||
});
|
||||
|
||||
if (queryResult.status === 0 && queryResult.stdout.includes("RUNNING")) {
|
||||
ui.writeVerbose("SafeChain Ultimate service is already running.");
|
||||
return;
|
||||
}
|
||||
|
||||
ui.writeVerbose(`Running: net start "${WINDOWS_SERVICE_NAME}"`);
|
||||
const startResult = await safeSpawn("net", ["start", WINDOWS_SERVICE_NAME], {
|
||||
stdio: "pipe",
|
||||
});
|
||||
|
||||
if (startResult.status !== 0) {
|
||||
throw new Error(
|
||||
`Failed to start service (exit code: ${startResult.status})`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} msiPath
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue