Let Idunn manage VoidBot keepalive

This commit is contained in:
Meta Vens 2026-06-07 02:43:24 +01:00
commit 993c98788c
7 changed files with 61 additions and 3 deletions

View file

@ -0,0 +1,2 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-voidbot.ps1

View file

@ -0,0 +1,17 @@
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$voidBotRoot = "E:\Projects\VoidBot"
$checkScript = Join-Path $voidBotRoot "scripts\check-voidbot-operations.ps1"
if (-not (Test-Path -LiteralPath $checkScript)) {
throw "VoidBot operations probe is missing at $checkScript."
}
Push-Location -LiteralPath $voidBotRoot
try {
& powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File $checkScript -FailOnIssues
exit $LASTEXITCODE
} finally {
Pop-Location
}

View file

@ -0,0 +1,2 @@
@echo off
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\VoidBot\scripts\start-voidbot-stack.ps1

View file

@ -46,6 +46,14 @@ $watchdogs = @(
Health = "$repoRoot\scripts\health-stonks.cmd"
Restart = "$repoRoot\scripts\restart-stonks.cmd"
},
[pscustomobject]@{
Id = "voidbot"
Name = "VoidBot local stack"
Verse = "starfire.local"
Health = "$repoRoot\scripts\health-voidbot.cmd"
Restart = "$repoRoot\scripts\restart-voidbot.cmd"
IntervalSeconds = 300
},
[pscustomobject]@{
Id = "nightwing-gjallar"
Name = "Nightwing Gjallar framebuffer compositor"
@ -111,7 +119,7 @@ function Start-Watchdog {
"--verse", $Watchdog.Verse,
"--store", $storePath,
"--health-command", $Watchdog.Health,
"--interval-seconds", "$IntervalSeconds"
"--interval-seconds", "$(if ($Watchdog.PSObject.Properties['IntervalSeconds']) { $Watchdog.IntervalSeconds } else { $IntervalSeconds })"
)
if (-not [string]::IsNullOrWhiteSpace($Watchdog.Restart)) {
$arguments += @("--restart-command", $Watchdog.Restart, "--execute")