forked from 1rgs/claude-code-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrestart.ps1
More file actions
23 lines (19 loc) · 851 Bytes
/
restart.ps1
File metadata and controls
23 lines (19 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# anthropic-proxy Restart Script for Windows
$ErrorActionPreference = "Continue"
Write-Host "`n🔍 Finding and stopping existing anthropic-proxy processes on port 8082..." -ForegroundColor Cyan
# Find processes using port 8082
$connections = Get-NetTCPConnection -LocalPort 8082 -ErrorAction SilentlyContinue
if ($connections) {
foreach ($conn in $connections) {
$p = Get-Process -Id $conn.OwningProcess -ErrorAction SilentlyContinue
if ($p) {
Write-Host "🛑 Stopping process $($p.ProcessName) (PID: $($p.Id))..." -ForegroundColor Yellow
Stop-Process -Id $p.Id -Force
}
}
Write-Host "✅ Existing processes stopped." -ForegroundColor Green
} else {
Write-Host "ℹ️ No existing process found on port 8082." -ForegroundColor Gray
}
# Start the server using start.ps1
.\start.ps1