Add Muninn Quest access surface

This commit is contained in:
Meta Vens 2026-06-12 16:09:03 +01:00
commit d5345e5875
8 changed files with 492 additions and 6 deletions

View file

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

View file

@ -0,0 +1,30 @@
param(
[string] $MuninnExe = "C:\Meta\Odin\Muninn\muninn.exe",
[string] $StorePath = "C:\Meta\Odin\state\starfire.muninn.telemetry.cc"
)
$ErrorActionPreference = "Stop"
if (-not (Test-Path -LiteralPath $MuninnExe)) {
throw "Muninn executable not found at $MuninnExe"
}
$process = Get-CimInstance Win32_Process |
Where-Object {
$_.Name -ieq "muninn.exe" -and
$_.CommandLine -like "*serve*" -and
$_.CommandLine -like "*--host*starfire*" -and
$_.CommandLine -like "*--quest-adb*"
} |
Select-Object -First 1
if ($null -eq $process) {
throw "Starfire Muninn serve process is not running with Quest access enabled"
}
& $MuninnExe --health --store $StorePath
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
& $MuninnExe quest-access-status --store $StorePath
exit $LASTEXITCODE

View file

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

View file

@ -0,0 +1,53 @@
param(
[string] $MuninnExe = "C:\Meta\Odin\Muninn\muninn.exe",
[string] $StorePath = "C:\Meta\Odin\state\starfire.muninn.telemetry.cc",
[string] $LogRoot = "C:\Meta\Odin\logs\starfire-muninn",
[string] $QuestSerial = "1WMHHB68PG1515"
)
$ErrorActionPreference = "Stop"
if (-not (Test-Path -LiteralPath $MuninnExe)) {
throw "Muninn executable not found at $MuninnExe"
}
Get-CimInstance Win32_Process |
Where-Object {
$_.Name -ieq "muninn.exe" -and
$_.CommandLine -like "*serve*" -and
$_.CommandLine -like "*--host*starfire*"
} |
ForEach-Object {
& taskkill.exe /PID $_.ProcessId /T /F | Out-Null
}
New-Item -ItemType Directory -Force -Path $LogRoot | Out-Null
$storeParent = Split-Path -Parent $StorePath
if (-not [string]::IsNullOrWhiteSpace($storeParent)) {
New-Item -ItemType Directory -Force -Path $storeParent | Out-Null
}
$arguments = @(
"serve",
"--store", $StorePath,
"--log-root", $LogRoot,
"--host", "starfire",
"--interval-seconds", "15",
"--quest-adb",
"--quest-serial", $QuestSerial
)
$process = Start-Process `
-FilePath $MuninnExe `
-ArgumentList $arguments `
-WindowStyle Hidden `
-PassThru `
-RedirectStandardOutput (Join-Path $LogRoot "muninn-serve.out.log") `
-RedirectStandardError (Join-Path $LogRoot "muninn-serve.err.log")
$process.Id | Set-Content -Encoding ASCII -LiteralPath (Join-Path $LogRoot "muninn-serve.pid")
Start-Sleep -Seconds 2
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "health-starfire-muninn.ps1") `
-MuninnExe $MuninnExe `
-StorePath $StorePath