feat(secubox-core): add plugins/catalog directory structure
Adds the missing /usr/share/secubox/plugins/catalog/ directory that is documented but was not created by the package installer. Changes: - Create plugins/catalog directory structure - Update Makefile to install catalog directory - Add README explaining module catalog format - Add example module catalog JSON file as reference Directory structure: - /usr/share/secubox/modules/ - Runtime module metadata (empty by design) - /usr/share/secubox/plugins/catalog/ - Module catalog manifests - /usr/share/secubox/scripts/ - Shared helper scripts This completes the directory structure documented in the README. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5afb02c815
commit
86d71c8dde
@ -67,9 +67,13 @@ define Package/secubox-core/install
|
|||||||
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.secubox $(1)/usr/libexec/rpcd/
|
$(INSTALL_BIN) ./root/usr/libexec/rpcd/luci.secubox $(1)/usr/libexec/rpcd/
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/usr/share/secubox/modules
|
$(INSTALL_DIR) $(1)/usr/share/secubox/modules
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/secubox/plugins/catalog
|
||||||
$(INSTALL_DIR) $(1)/usr/share/secubox/scripts
|
$(INSTALL_DIR) $(1)/usr/share/secubox/scripts
|
||||||
$(INSTALL_DATA) ./root/usr/share/secubox/scripts/* $(1)/usr/share/secubox/scripts/
|
$(INSTALL_DATA) ./root/usr/share/secubox/scripts/* $(1)/usr/share/secubox/scripts/
|
||||||
|
|
||||||
|
# Install module catalog files if they exist
|
||||||
|
-$(INSTALL_DATA) ./root/usr/share/secubox/plugins/catalog/*.json $(1)/usr/share/secubox/plugins/catalog/ 2>/dev/null || true
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/var/run/secubox
|
$(INSTALL_DIR) $(1)/var/run/secubox
|
||||||
$(INSTALL_DIR) $(1)/var/log/secubox
|
$(INSTALL_DIR) $(1)/var/log/secubox
|
||||||
endef
|
endef
|
||||||
|
|||||||
@ -0,0 +1,57 @@
|
|||||||
|
# SecuBox Module Catalog
|
||||||
|
|
||||||
|
This directory contains module catalog entries for the SecuBox AppStore.
|
||||||
|
|
||||||
|
## Structure
|
||||||
|
|
||||||
|
Each module has its own JSON file:
|
||||||
|
- `<module-id>.json` - Module manifest and metadata
|
||||||
|
|
||||||
|
## Module Catalog Format
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "module-name",
|
||||||
|
"name": "Display Name",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"category": "networking",
|
||||||
|
"runtime": "native",
|
||||||
|
"packages": {
|
||||||
|
"required": ["package-name"],
|
||||||
|
"recommended": ["optional-package"]
|
||||||
|
},
|
||||||
|
"capabilities": ["capability-1", "capability-2"],
|
||||||
|
"requirements": {
|
||||||
|
"min_ram_mb": 64,
|
||||||
|
"min_storage_mb": 10
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Categories
|
||||||
|
|
||||||
|
- `networking` - Network services and utilities
|
||||||
|
- `security` - Security and threat detection
|
||||||
|
- `monitoring` - System and network monitoring
|
||||||
|
- `iot` - IoT and home automation
|
||||||
|
- `media` - Media streaming and entertainment
|
||||||
|
- `system` - System utilities and management
|
||||||
|
|
||||||
|
## Adding New Modules
|
||||||
|
|
||||||
|
1. Create a new JSON file: `<module-id>.json`
|
||||||
|
2. Define the manifest with required fields:
|
||||||
|
- `id`, `name`, `version`
|
||||||
|
- `category`, `runtime`
|
||||||
|
- `packages`, `capabilities`
|
||||||
|
|
||||||
|
3. Test installation:
|
||||||
|
```bash
|
||||||
|
secubox app install <module-id>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- Module catalog files are used by `secubox-appstore` for module discovery
|
||||||
|
- The `luci-app-secubox/appstore/apps.json` file contains the master catalog
|
||||||
|
- Individual module files here provide detailed metadata for advanced features
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"id": "example-module",
|
||||||
|
"name": "Example Module",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"category": "system",
|
||||||
|
"runtime": "native",
|
||||||
|
"description": "Example module catalog entry demonstrating the structure",
|
||||||
|
"author": "SecuBox Team",
|
||||||
|
"license": "GPL-2.0",
|
||||||
|
"url": "https://github.com/your-org/example-module",
|
||||||
|
"icon": "⚙️",
|
||||||
|
"tags": ["example", "demo"],
|
||||||
|
"packages": {
|
||||||
|
"required": [
|
||||||
|
"luci-app-example-module"
|
||||||
|
],
|
||||||
|
"recommended": [
|
||||||
|
"example-module-extras"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"capabilities": [
|
||||||
|
"system-management",
|
||||||
|
"monitoring"
|
||||||
|
],
|
||||||
|
"requirements": {
|
||||||
|
"min_ram_mb": 64,
|
||||||
|
"min_storage_mb": 10,
|
||||||
|
"openwrt_version": "24.10"
|
||||||
|
},
|
||||||
|
"hooks": {
|
||||||
|
"pre_install": "/usr/share/example-module/hooks/pre-install.sh",
|
||||||
|
"post_install": "/usr/share/example-module/hooks/post-install.sh",
|
||||||
|
"pre_remove": "/usr/share/example-module/hooks/pre-remove.sh",
|
||||||
|
"post_remove": "/usr/share/example-module/hooks/post-remove.sh"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"uci_package": "example-module",
|
||||||
|
"init_script": "/etc/init.d/example-module",
|
||||||
|
"default_enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user