mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
Feat/next packages (#2646)
* fix mac build * wip * chore: Update the effects to get rid of bad pattern * chore: Some small changes * wip * fix: Health checks don't show during race * fix: Restart working --------- Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
@@ -123,9 +123,9 @@ export class SystemForStartOs implements System {
|
||||
return this.abi.uninit({ effects, nextVersion })
|
||||
}
|
||||
case "/main/start": {
|
||||
if (this.onTerm) await this.onTerm()
|
||||
const started = async (onTerm: () => Promise<void>) => {
|
||||
await effects.setMainStatus({ status: "running" })
|
||||
if (this.onTerm) await this.onTerm()
|
||||
this.onTerm = onTerm
|
||||
}
|
||||
const daemons = await (
|
||||
@@ -135,10 +135,11 @@ export class SystemForStartOs implements System {
|
||||
})
|
||||
).build()
|
||||
this.onTerm = daemons.term
|
||||
return
|
||||
}
|
||||
case "/main/stop": {
|
||||
await effects.setMainStatus({ status: "stopped" })
|
||||
if (this.onTerm) await this.onTerm()
|
||||
await effects.setMainStatus({ status: "stopped" })
|
||||
delete this.onTerm
|
||||
return duration(30, "s")
|
||||
}
|
||||
@@ -183,6 +184,7 @@ export class SystemForStartOs implements System {
|
||||
return dependencyConfig.update(options.input as any) // TODO
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
throw new Error(`Method ${options.procedure} not implemented.`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user