-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop.bat
More file actions
30 lines (26 loc) · 941 Bytes
/
stop.bat
File metadata and controls
30 lines (26 loc) · 941 Bytes
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
@echo off
chcp 65001 >nul 2>&1
echo ========================================
echo KronosFinceptLab - Stopping Services
echo ========================================
echo.
echo [1/3] Stopping API Backend (port 8000)...
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":8000 " ^| findstr "LISTENING"') do (
taskkill /PID %%a /F >nul 2>&1
echo Killed PID %%a
)
echo.
echo [2/3] Stopping Web Frontend (port 3000)...
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":3000 " ^| findstr "LISTENING"') do (
taskkill /PID %%a /F >nul 2>&1
echo Killed PID %%a
)
echo.
echo [3/3] Cleaning up stray processes...
taskkill /FI "WINDOWTITLE eq KronosFinceptLab API*" /T /F >nul 2>&1
taskkill /FI "WINDOWTITLE eq KronosFinceptLab Web*" /T /F >nul 2>&1
echo.
echo ========================================
echo All KronosFinceptLab services stopped!
echo ========================================
timeout /t 2 /nobreak >nul