From 878faf5bec8803e87f44fdce60e165735bcd4e98 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Tue, 6 Jan 2026 16:25:59 +0100 Subject: [PATCH] fix: CrowdSec RPC process detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed pgrep command to detect running CrowdSec process: - Changed from `pgrep -x crowdsec` to `pgrep crowdsec` - The -x flag requires exact process name match which wasn't working - Affects both check_cscli() and get_status() functions - Now correctly detects service as running in dashboard 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- .../root/usr/libexec/rpcd/luci.crowdsec-dashboard | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/secubox/luci-app-crowdsec-dashboard/root/usr/libexec/rpcd/luci.crowdsec-dashboard b/package/secubox/luci-app-crowdsec-dashboard/root/usr/libexec/rpcd/luci.crowdsec-dashboard index 053baf0f..fdcb9dfe 100755 --- a/package/secubox/luci-app-crowdsec-dashboard/root/usr/libexec/rpcd/luci.crowdsec-dashboard +++ b/package/secubox/luci-app-crowdsec-dashboard/root/usr/libexec/rpcd/luci.crowdsec-dashboard @@ -23,7 +23,7 @@ check_cscli() { fi # Check if crowdsec service is running - if ! pgrep -x crowdsec >/dev/null 2>&1; then + if ! pgrep crowdsec >/dev/null 2>&1; then echo '{"error": "crowdsec service not running"}' exit 1 fi @@ -107,7 +107,7 @@ get_status() { json_init # CrowdSec service - if pgrep -x crowdsec >/dev/null 2>&1; then + if pgrep crowdsec >/dev/null 2>&1; then json_add_string "crowdsec" "running" else json_add_string "crowdsec" "stopped"