fix(CheckProxy): update port conflict check to ensure accurate grep matching

This commit is contained in:
Andras Bacsai
2025-04-05 13:13:15 +02:00
parent c74cb45a32
commit 11ada83f1e

View File

@@ -152,7 +152,7 @@ class CheckProxy
'available' => 'command -v netstat >/dev/null 2>&1', 'available' => 'command -v netstat >/dev/null 2>&1',
'check' => [ 'check' => [
// Get listening process details // Get listening process details
"netstat_output=\$(netstat -tuln 2>/dev/null) && echo \"\$netstat_output\" | grep ':$port'", "netstat_output=\$(netstat -tuln 2>/dev/null) && echo \"\$netstat_output\" | grep ':$port '",
// Count listeners // Count listeners
"echo \"\$netstat_output\" | grep ':$port' | grep -c 'LISTEN'", "echo \"\$netstat_output\" | grep ':$port' | grep -c 'LISTEN'",
], ],