fix: improve llmwiki search integration
This commit is contained in:
1 parent
4809ee7db3
commit
56044d9cb7
20 files changed
+504
-66
No files matched your search
@@ -0,0 +1,20 @@
|
||||
. "$PSScriptRoot\env.ps1"
|
||||
|
||||
$PidFile = Join-Path $PidDir "backend.pid"
|
||||
if (-not (Test-Path -LiteralPath $PidFile)) {
|
||||
Write-Host "Backend is not running (no pid file)."
|
||||
exit 0
|
||||
}
|
||||
|
||||
$rawPid = Get-Content -LiteralPath $PidFile | Select-Object -First 1
|
||||
$processId = 0
|
||||
if (-not [int]::TryParse([string]$rawPid, [ref]$processId) -or -not (Get-Process -Id $processId -ErrorAction SilentlyContinue)) {
|
||||
Remove-Item -LiteralPath $PidFile -Force -ErrorAction SilentlyContinue
|
||||
Write-Host "Backend is not running (stale pid file removed)."
|
||||
exit 0
|
||||
}
|
||||
|
||||
Write-Host "Stopping backend (pid $processId)..."
|
||||
Stop-ProcessTree -ProcessId $processId
|
||||
Remove-Item -LiteralPath $PidFile -Force -ErrorAction SilentlyContinue
|
||||
Write-Host "Backend stopped."
|
||||
Reference in new issue
Block a user