From 3b8b35069a8f170235b96d6e24ddd607895e02c2 Mon Sep 17 00:00:00 2001 From: AskaEth Date: Sun, 28 Jun 2026 16:53:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20ethend.bat=20=E5=90=AF=E5=8A=A8=E6=97=B6?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E8=B5=B0=E7=AB=AF=E5=8F=A3=E6=A3=80=E6=B5=8B?= =?UTF-8?q?+Y/n=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ethend.bat | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ethend.bat b/ethend.bat index a64af94..9a4ca8d 100644 --- a/ethend.bat +++ b/ethend.bat @@ -117,16 +117,7 @@ if %DO_FRESH%==1 ( curl -s -X POST "http://localhost:%ETHEND_PORT%/api/services/start-all-fresh" >nul 2>&1 ) -:: Check if already running -curl -s -o nul "http://localhost:%ETHEND_PORT%/api/health" 2>nul -if %ERRORLEVEL%==0 ( - echo. - echo [OK] ethend already running: http://localhost:%ETHEND_PORT% - echo API: http://localhost:%ETHEND_PORT%/api/health - exit /b 0 -) - -:: Check port conflict +:: Check if port already in use set FOUND_PID= for /f "tokens=5" %%a in ('netstat -ano ^| findstr /R ":%ETHEND_PORT% " ^| findstr "LISTENING"') do set FOUND_PID=%%a if not "%FOUND_PID%"=="" ( @@ -135,6 +126,7 @@ if not "%FOUND_PID%"=="" ( set /p CHOICE="Kill old process and restart? [Y/n]: " if /i "!CHOICE!"=="n" ( echo [INFO] Aborted by user. + pause exit /b 0 ) echo [INFO] Killing PID %FOUND_PID%...