diff --git a/server/src/scrypted-main-exports.ts b/server/src/scrypted-main-exports.ts index 8c293f9b68..2373d0bcab 100644 --- a/server/src/scrypted-main-exports.ts +++ b/server/src/scrypted-main-exports.ts @@ -11,7 +11,6 @@ export function isChildProcess() { } function start(mainFilename: string, options?: { - restart?: () => void, onRuntimeCreated?: (runtime: Runtime) => Promise, }) { if (!global.gc) { diff --git a/server/src/scrypted-server-main.ts b/server/src/scrypted-server-main.ts index f3817a2079..742e0fc7d1 100644 --- a/server/src/scrypted-server-main.ts +++ b/server/src/scrypted-server-main.ts @@ -113,7 +113,6 @@ app.use(bodyParser.raw({ type: 'application/zip', limit: 100000000 }) as any) async function start(mainFilename: string, options?: { onRuntimeCreated?: (runtime: ScryptedRuntime) => Promise, - restart?: () => void, }) { const volumeDir = getScryptedVolume(); await fs.promises.mkdir(volumeDir, { @@ -380,10 +379,7 @@ async function start(mainFilename: string, options?: { }); } - if (options?.restart) - options.restart(); - else - process.exit(); + scrypted.serviceControl.restart(); }); app.get('/web/component/backup', async (req, res) => {