The enable_module() and disable_module() functions were incorrectly also starting/stopping services. They should only manage UCI configuration flags. Service lifecycle (start/stop/restart) should be handled by dedicated functions. **Changes:** **enable_module():** - ✅ Sets UCI `secubox.{module}.enabled = '1'` - ✅ Commits UCI changes - ❌ Removed: Service enable/start commands - ✅ Returns success with note to use start_module() **disable_module():** - ✅ Sets UCI `secubox.{module}.enabled = '0'` - ✅ Commits UCI changes - ❌ Removed: Service stop/disable commands - ✅ Returns success with note to use stop_module() **Behavior:** Before: ```bash ubus call luci.secubox enable_module '{"module":"example"}' # Would: Set enabled=1 + Enable service + Start service ``` After: ```bash ubus call luci.secubox enable_module '{"module":"example"}' # Only: Set enabled=1 in UCI config ubus call luci.secubox start_module '{"module":"example"}' # Separately: Start the actual service ``` **Benefits:** - ✅ Clear separation of concerns - ✅ Enable/disable = logical flag in UCI - ✅ Start/stop/restart = actual service control - ✅ More predictable behavior - ✅ Aligns with user expectations **Testing:** ```bash # Enable in config ubus call luci.secubox enable_module '{"module":"network_modes"}' → UCI: enabled='1' ✓ # Disable in config ubus call luci.secubox disable_module '{"module":"network_modes"}' → UCI: enabled='0' ✓ # Services not affected, use start/stop separately ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| libexec | ||
| share | ||