From 0d2506f3ef8433aca1544adaa54d406d08e41189 Mon Sep 17 00:00:00 2001 From: theRADcozaDEV Date: Tue, 10 Mar 2026 12:23:29 +0200 Subject: [PATCH] Fix batch script syntax error in port check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed 'was unexpected at this time' error caused by: - Unescaped parentheses in echo statements - Removed extra pipe to LISTENING filter (not needed) - Changed √ symbol to OK for better Windows compatibility - Escaped all parentheses with ^ character The port check now works correctly on Windows. --- setup.bat | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/setup.bat b/setup.bat index 41954d3..e1aa1b3 100644 --- a/setup.bat +++ b/setup.bat @@ -29,59 +29,59 @@ echo Checking port availability... set PORTS_OK=1 REM Check port 8080 (Nginx) -netstat -ano | findstr ":8080 " | findstr "LISTENING" >nul 2>&1 +netstat -ano | findstr ":8080" >nul 2>&1 if %errorlevel% equ 0 ( - echo [X] Port 8080 (Web Server) - IN USE + echo [X] Port 8080 ^(Web Server^) - IN USE set PORTS_OK=0 ) else ( - echo [√] Port 8080 (Web Server) - Available + echo [OK] Port 8080 ^(Web Server^) - Available ) REM Check port 8025 (Mailpit Dashboard) -netstat -ano | findstr ":8025 " | findstr "LISTENING" >nul 2>&1 +netstat -ano | findstr ":8025" >nul 2>&1 if %errorlevel% equ 0 ( - echo [X] Port 8025 (Mailpit Dashboard) - IN USE + echo [X] Port 8025 ^(Mailpit Dashboard^) - IN USE set PORTS_OK=0 ) else ( - echo [√] Port 8025 (Mailpit Dashboard) - Available + echo [OK] Port 8025 ^(Mailpit Dashboard^) - Available ) REM Check port 1025 (Mailpit SMTP) -netstat -ano | findstr ":1025 " | findstr "LISTENING" >nul 2>&1 +netstat -ano | findstr ":1025" >nul 2>&1 if %errorlevel% equ 0 ( - echo [X] Port 1025 (Mailpit SMTP) - IN USE + echo [X] Port 1025 ^(Mailpit SMTP^) - IN USE set PORTS_OK=0 ) else ( - echo [√] Port 1025 (Mailpit SMTP) - Available + echo [OK] Port 1025 ^(Mailpit SMTP^) - Available ) REM Check port 6379 (Redis) -netstat -ano | findstr ":6379 " | findstr "LISTENING" >nul 2>&1 +netstat -ano | findstr ":6379" >nul 2>&1 if %errorlevel% equ 0 ( - echo [X] Port 6379 (Redis) - IN USE + echo [X] Port 6379 ^(Redis^) - IN USE set PORTS_OK=0 ) else ( - echo [√] Port 6379 (Redis) - Available + echo [OK] Port 6379 ^(Redis^) - Available ) REM Check database port based on selection if "%DB%"=="mysql" ( - netstat -ano | findstr ":3306 " | findstr "LISTENING" >nul 2>&1 + netstat -ano | findstr ":3306" >nul 2>&1 if !errorlevel! equ 0 ( - echo [X] Port 3306 (MySQL) - IN USE + echo [X] Port 3306 ^(MySQL^) - IN USE set PORTS_OK=0 ) else ( - echo [√] Port 3306 (MySQL) - Available + echo [OK] Port 3306 ^(MySQL^) - Available ) ) if "%DB%"=="pgsql" ( - netstat -ano | findstr ":5432 " | findstr "LISTENING" >nul 2>&1 + netstat -ano | findstr ":5432" >nul 2>&1 if !errorlevel! equ 0 ( - echo [X] Port 5432 (PostgreSQL) - IN USE + echo [X] Port 5432 ^(PostgreSQL^) - IN USE set PORTS_OK=0 ) else ( - echo [√] Port 5432 (PostgreSQL) - Available + echo [OK] Port 5432 ^(PostgreSQL^) - Available ) )