From 645f644da8730633c612bab3e3f3eeb0007f673e Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Fri, 26 Dec 2025 07:11:46 +0100 Subject: [PATCH] fix: correct module detection in secubox RPCD script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed the modules page showing empty list by correcting: - RPCD script detection to use 'luci.' prefix (luci.crowdsec-dashboard, etc.) - Module ID extraction to remove 'luci.' prefix and '-dashboard' suffix - Package name for crowdsec to use full 'luci-app-crowdsec-dashboard' - Added ksm-manager to the module list Now the /admin/secubox/modules page will correctly detect and display all installed SecuBox modules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- luci-app-secubox/root/etc/config/secubox | 2 +- luci-app-secubox/root/usr/libexec/rpcd/luci.secubox | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/luci-app-secubox/root/etc/config/secubox b/luci-app-secubox/root/etc/config/secubox index 81444a45..edffabe3 100644 --- a/luci-app-secubox/root/etc/config/secubox +++ b/luci-app-secubox/root/etc/config/secubox @@ -14,7 +14,7 @@ config module 'crowdsec' option category 'security' option icon 'shield' option color '#22c55e' - option package 'luci-app-crowdsec' + option package 'luci-app-crowdsec-dashboard' option config 'crowdsec' option installed '0' option enabled '0' diff --git a/luci-app-secubox/root/usr/libexec/rpcd/luci.secubox b/luci-app-secubox/root/usr/libexec/rpcd/luci.secubox index f303bd1f..c4e522bd 100755 --- a/luci-app-secubox/root/usr/libexec/rpcd/luci.secubox +++ b/luci-app-secubox/root/usr/libexec/rpcd/luci.secubox @@ -10,12 +10,12 @@ # Module registry - auto-detected from /usr/libexec/rpcd/ detect_modules() { local modules="" - local scripts="crowdsec-dashboard netdata-dashboard netifyd-dashboard wireguard-dashboard network-modes client-guardian system-hub bandwidth-manager auth-guardian media-flow vhost-manager cdn-cache traffic-shaper" + local scripts="luci.crowdsec-dashboard luci.netdata-dashboard luci.netifyd-dashboard luci.wireguard-dashboard luci.network-modes luci.client-guardian luci.system-hub luci.bandwidth-manager luci.auth-guardian luci.media-flow luci.vhost-manager luci.cdn-cache luci.traffic-shaper luci.ksm-manager" for script in $scripts; do if [ -x "/usr/libexec/rpcd/$script" ]; then - # Convert script name to module ID (remove -dashboard suffix, convert dashes to underscores) - local module_id=$(echo "$script" | sed 's/-dashboard$//' | sed 's/-/_/g') + # Remove luci. prefix, remove -dashboard suffix, convert dashes to underscores + local module_id=$(echo "$script" | sed 's/^luci\.//' | sed 's/-dashboard$//' | sed 's/-/_/g') modules="$modules $module_id" fi done