diff --git a/lib/php-detector.sh b/lib/php-detector.sh index 7a288be..b4f6393 100644 --- a/lib/php-detector.sh +++ b/lib/php-detector.sh @@ -279,7 +279,8 @@ get_fpm_process_count() { [ -z "$1" ] && return 1 local pool_name="$1" # Usually username or domain - ps aux | grep -E "php-fpm.*pool\s+${pool_name}" | grep -v grep | wc -l + local count=$(ps aux | grep -E "php-fpm.*pool\s+${pool_name}" | grep -v grep | wc -l || echo 0) + echo "$count" } # Get memory usage per FPM process for a pool