The Kurgan 1.0.0: one process for the LCD, fans, lighting, local LLM servers and the web UI

This commit is contained in:
paul committed 2026-12-05 16:20:49 +13:00
commit f631386618
71 files changed
+14616

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
# Removes The Kurgan's startup task and stops it (an LLM server it started stops with it).
# -RestoreAIServices re-enables and starts the "Strata Local Service" and "Qwen4 Local Service" tasks
# -RemovePawnIO also uninstalls PawnIO (leave it if LibreHardwareMonitor or FanControl uses it)
# Settings stay in %LOCALAPPDATA%\Kurgan.
param([switch]$RemovePawnIO, [switch]$RestoreAIServices)
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(
[Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
$extra = ''
if ($RemovePawnIO) { $extra += ' -RemovePawnIO' }
if ($RestoreAIServices) { $extra += ' -RestoreAIServices' }
Start-Process powershell -Verb RunAs -Wait -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"$extra"
exit
}
foreach ($name in 'The Kurgan', 'TT LCD Dashboard') {
Stop-ScheduledTask -TaskName $name -ErrorAction SilentlyContinue
Unregister-ScheduledTask -TaskName $name -Confirm:$false -ErrorAction SilentlyContinue
}
Get-CimInstance Win32_Process -Filter "Name like 'python%.exe'" |
Where-Object { $_.CommandLine -like '*lcd_dashboard.py*' -or $_.CommandLine -like '*-m kurgan*' } |
ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }
Write-Host "Removed 'The Kurgan'." -ForegroundColor Green
if ($RestoreAIServices) {
Start-Sleep -Seconds 2 # let the LLM server's port close
foreach ($name in 'Strata Local Service', 'Qwen4 Local Service') {
if (Get-ScheduledTask -TaskName $name -ErrorAction SilentlyContinue) {
Enable-ScheduledTask -TaskName $name | Out-Null
Start-ScheduledTask -TaskName $name
Write-Host "Re-enabled '$name'." -ForegroundColor Green
}
}
}
if ($RemovePawnIO) { winget uninstall --id namazso.PawnIO --exact --silent }
Start-Sleep -Seconds 3