grep -c prints zero and exits one, so every echo-0 fallback produced a two-line count
This commit is contained in:
@@ -186,7 +186,7 @@ log "WebGUI check — $WEBGUI_URL"
|
||||
|
||||
# ── Healthy — completely silent ───────────────────────────────────────────────────────────────
|
||||
if check_webgui; then
|
||||
_nginx_count=$(pgrep -cx nginx 2>/dev/null || echo 0)
|
||||
_nginx_count=$(pgrep -cx nginx 2>/dev/null || true)
|
||||
_fpm_count=$(pgrep -fc "php-fpm" 2>/dev/null || echo 0)
|
||||
log "$ICON_WEBGUI WebGUI responding ✅ — nginx workers:${_nginx_count} php-fpm workers:${_fpm_count}"
|
||||
echo "WebGUI responding — healthy ✅"
|
||||
|
||||
Reference in New Issue
Block a user