-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop.bat
More file actions
40 lines (34 loc) · 1.26 KB
/
Copy pathstop.bat
File metadata and controls
40 lines (34 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@echo off
REM CoreAI Stop Script for Windows
echo Stopping CoreAI services...
echo.
REM Force stop port 5000 (Backend FIXED port)
echo Checking port 5000 (Backend)...
for /f "tokens=5" %%a in ('netstat -ano ^| findstr :5000 ^| findstr LISTENING') do (
echo Stopping backend process on port 5000 (PID %%a)
taskkill /F /PID %%a >nul 2>&1
)
REM Force stop port 3001 (Node.js Proxy)
echo Checking port 3001 (Proxy)...
for /f "tokens=5" %%a in ('netstat -ano ^| findstr :3001 ^| findstr LISTENING') do (
echo Stopping proxy process on port 3001 (PID %%a)
taskkill /F /PID %%a >nul 2>&1
)
REM Stop any other backend ports (cleanup)
for %%p in (5001 5002 5003 5004 5005) do (
for /f "tokens=5" %%a in ('netstat -ano ^| findstr :%%p ^| findstr LISTENING') do (
echo Stopping stray backend process on port %%p (PID %%a)
taskkill /F /PID %%a >nul 2>&1
)
)
REM Stop frontend ports
for %%p in (3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010) do (
for /f "tokens=5" %%a in ('netstat -ano ^| findstr :%%p ^| findstr LISTENING') do (
echo Stopping frontend process on port %%p (PID %%a)
taskkill /F /PID %%a >nul 2>&1
)
)
echo.
echo All CoreAI services stopped - Port 5000 is now free for backend
echo.
timeout /t 2 /nobreak >nul