Let Idunn manage VoidBot keepalive
This commit is contained in:
parent
9988c430f0
commit
993c98788c
7 changed files with 61 additions and 3 deletions
2
scripts/health-voidbot.cmd
Normal file
2
scripts/health-voidbot.cmd
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
@echo off
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\health-voidbot.ps1
|
||||
17
scripts/health-voidbot.ps1
Normal file
17
scripts/health-voidbot.ps1
Normal 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
|
||||
}
|
||||
2
scripts/restart-voidbot.cmd
Normal file
2
scripts/restart-voidbot.cmd
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
@echo off
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\VoidBot\scripts\start-voidbot-stack.ps1
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue