2026-05-31 03:33:00 +01:00
|
|
|
param(
|
2026-07-10 14:42:20 +01:00
|
|
|
[int] $Port = 8798,
|
|
|
|
|
[string] $OdinRoot = "E:\Projects\Odin",
|
|
|
|
|
[string] $OdinCultMeshUri = $(if ($env:ODIN_CULTMESH_URI) { $env:ODIN_CULTMESH_URI } else { "cultmesh://odin/rendezvous/provider-catalog" })
|
2026-05-31 03:33:00 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
$ErrorActionPreference = "Stop"
|
2026-07-10 14:42:20 +01:00
|
|
|
$launcher = Join-Path $OdinRoot "scripts\start-hermodr.ps1"
|
|
|
|
|
if (-not (Test-Path -LiteralPath $launcher)) {
|
|
|
|
|
throw "Odin-owned Hermodr launcher is missing: $launcher"
|
2026-05-31 03:33:00 +01:00
|
|
|
}
|
|
|
|
|
|
2026-07-10 14:42:20 +01:00
|
|
|
$healthUrl = "http://127.0.0.1:$Port/health"
|
|
|
|
|
try {
|
|
|
|
|
$health = Invoke-RestMethod -Uri $healthUrl -TimeoutSec 2
|
|
|
|
|
if ($health.ok -and $health.service -eq "hermodr-browser-lowering") {
|
|
|
|
|
Write-Host "Eve browser reference already available at http://127.0.0.1:$Port/"
|
|
|
|
|
exit 0
|
2026-05-31 03:33:00 +01:00
|
|
|
}
|
2026-07-10 14:42:20 +01:00
|
|
|
} catch {
|
|
|
|
|
# Hermodr is not running on the requested local port.
|
|
|
|
|
}
|
2026-05-31 03:33:00 +01:00
|
|
|
|
2026-07-10 14:42:20 +01:00
|
|
|
& $launcher -HostAddress "127.0.0.1" -Port $Port -OdinCultMeshUri $OdinCultMeshUri -NoWindow
|
|
|
|
|
if (-not $?) {
|
|
|
|
|
throw "Hermodr failed to start."
|
|
|
|
|
}
|
|
|
|
|
Write-Host "Eve browser reference available at http://127.0.0.1:$Port/"
|