Files
SPipe/stop-spipe.bat
bjkim1 14f07181db 예전 프로그램 이름 표기 정리: 실행 파일 이름을 start-spipe.bat, stop-spipe.bat로 변경
- README, 예제 설명, 코드 주석, CSS 머리말, 시험 임시 폴더 접두어의 예전 이름 정리
- 브라우저 저장 키·세션 DB 이름은 저장된 설정 보존을 위해 유지
2026-10-30 11:07:14 +09:00

56 lines
1.5 KiB
Batchfile

@echo off
title SPipe Stopper
echo ========================================================
echo SPipe Process Stopper
echo ========================================================
echo.
set KILLED_COUNT=0
:: 1. Check and terminate Port 8000 (API)
echo [1/2] Checking Port 8000 (SPipe API)...
set PID_8000=
for /f "tokens=5" %%a in ('netstat -ano ^| findstr /R /C:":8000 .*LISTENING"') do (
set PID_8000=%%a
)
if "%PID_8000%"=="" (
echo - Port 8000 is empty.
) else (
echo - Port 8000 occupied by PID: %PID_8000%. Terminating...
taskkill /F /PID %PID_8000% /T >nul 2>&1
echo - PID %PID_8000% terminated successfully.
set /a KILLED_COUNT+=1
)
echo.
:: 2. Check and terminate Port 5173 (Web)
echo [2/2] Checking Port 5173 (SPipe Web)...
set PID_5173=
for /f "tokens=5" %%a in ('netstat -ano ^| findstr /R /C:":5173 .*LISTENING"') do (
set PID_5173=%%a
)
if "%PID_5173%"=="" (
echo - Port 5173 is empty.
) else (
echo - Port 5173 occupied by PID: %PID_5173%. Terminating...
taskkill /F /PID %PID_5173% /T >nul 2>&1
echo - PID %PID_5173% terminated successfully.
set /a KILLED_COUNT+=1
)
echo.
echo ========================================================
if %KILLED_COUNT% gtr 0 (
echo [RESULT] SPipe servers have been stopped.
) else (
echo [RESULT] No active SPipe servers were running.
)
echo * Terminated only designated ports [8000, 5173].
echo ========================================================
echo.
pause