Keep Starfire USB Move light worker with Muninn
This commit is contained in:
parent
7c1e6a26fb
commit
3894084e80
2 changed files with 31 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
param(
|
||||
[string] $MuninnExe = "C:\Meta\Odin\Muninn\muninn.exe",
|
||||
[string] $StorePath = "C:\Meta\Odin\state\starfire.muninn.telemetry.cc"
|
||||
[string] $StorePath = "C:\Meta\Odin\state\starfire.muninn.telemetry.cc",
|
||||
[switch] $SkipUsbMoveLight
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
|
@ -27,4 +28,16 @@ if ($LASTEXITCODE -ne 0) {
|
|||
}
|
||||
|
||||
& $MuninnExe quest-access-status --store $StorePath
|
||||
exit $LASTEXITCODE
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
|
||||
if (-not $SkipUsbMoveLight) {
|
||||
$moveLightProcess = Get-Process -Name "Mimir.PsMoveProbe" -ErrorAction SilentlyContinue |
|
||||
Select-Object -First 1
|
||||
if ($null -eq $moveLightProcess) {
|
||||
throw "Starfire USB Move light worker is not running"
|
||||
}
|
||||
}
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@ 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"
|
||||
[string] $QuestSerial = "1WMHHB68PG1515",
|
||||
[string] $MimirRepoPath = "E:\Projects\Mimir",
|
||||
[string] $UsbMoveLightRgb = "#35ff6c",
|
||||
[int] $UsbMoveLightRefreshMs = 200,
|
||||
[switch] $SkipUsbMoveLight
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
|
@ -47,6 +51,17 @@ $process = Start-Process `
|
|||
|
||||
$process.Id | Set-Content -Encoding ASCII -LiteralPath (Join-Path $LogRoot "muninn-serve.pid")
|
||||
|
||||
if (-not $SkipUsbMoveLight) {
|
||||
$moveLightScript = Join-Path $MimirRepoPath "scripts\start-starfire-move-light.ps1"
|
||||
if (-not (Test-Path -LiteralPath $moveLightScript)) {
|
||||
throw "Starfire USB Move light script not found at $moveLightScript"
|
||||
}
|
||||
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File $moveLightScript `
|
||||
-Rgb $UsbMoveLightRgb `
|
||||
-RefreshMs $UsbMoveLightRefreshMs `
|
||||
-HoldSeconds 0
|
||||
}
|
||||
|
||||
Start-Sleep -Seconds 2
|
||||
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $PSScriptRoot "health-starfire-muninn.ps1") `
|
||||
-MuninnExe $MuninnExe `
|
||||
|
|
|
|||
Loading…
Reference in a new issue