secubox-openwrt/scripts
CyberMind-FR c4a2601c11 feat(luci-app-masterlink): Add mesh enrollment client for OpenWRT
New package for joining SecuBox mesh networks from OpenWRT devices.

RPCD handler (/usr/libexec/rpcd/luci.masterlink):
- status: Current mesh membership state
- join: Join mesh with master_ip and token
- leave: Leave current mesh network
- info: Local node info (fingerprint, hostname, IP)
- verify: Verify master before joining

CLI tool (/usr/bin/sbx-mesh-join):
- URL parsing: sbx-mesh-join 'http://ip:7331/master-link/?token=xxx'
- Direct args: sbx-mesh-join 192.168.1.1 token123
- Auto-generates node fingerprint from MAC address
- Saves to UCI on success

LuCI interface (Services > Master-Link):
- Status display (connected/pending/disconnected)
- Invite URL/token input with Verify and Join buttons
- Leave mesh button when connected
- CLI usage help section

Also adds screenshot-capture.js for automated LuCI screenshots.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-26 14:21:48 +01:00
..
auto_block_luci_bruteforce.sh feat: Media-flow UI + security updates 2026-01-12 07:57:39 +01:00
capture-screenshots.sh feat(luci-app-masterlink): Add mesh enrollment client for OpenWRT 2026-03-26 14:21:48 +01:00
check-sbom-prereqs.sh feat(sbom): Add CRA Annex I compliant SBOM pipeline 2026-03-04 08:01:00 +01:00
diagnose.sh feat: bootstrap zigbee2mqtt app and diagnostics 2025-12-29 15:51:07 +01:00
README.fr.md docs: Add trilingual documentation (French and Chinese translations) 2026-03-20 10:00:18 +01:00
README.md feat(scripts): Add SecuBox seed and slipstream scripts for auto-install 2026-03-20 10:23:05 +01:00
README.zh.md docs: Add trilingual documentation (French and Chinese translations) 2026-03-20 10:00:18 +01:00
refresh-manifest-specs.py feat(appstore): add normalized catalog manifests 2025-12-30 08:48:41 +01:00
sbom-audit-feed.sh feat(sbom): Add CRA Annex I compliant SBOM pipeline 2026-03-04 08:01:00 +01:00
sbom-generate.sh feat(sbom): Add CRA Annex I compliant SBOM pipeline 2026-03-04 08:01:00 +01:00
screenshot-capture.js feat(luci-app-masterlink): Add mesh enrollment client for OpenWRT 2026-03-26 14:21:48 +01:00
secubox-seed.sh fix(seed): Add opkg lock wait before install retries 2026-03-20 10:56:23 +01:00
secubox-slipstream.sh fix(seed): Add signature check disable and retry logic for GitHub Pages 2026-03-20 10:55:12 +01:00
setup-github-pages.sh chore: Update GitHub repo URL to CyberMind-FR organization 2026-01-14 09:44:01 +01:00
setup-wiki.sh chore: Update GitHub repo URL to CyberMind-FR organization 2026-01-14 09:44:01 +01:00
smoke_test.sh feat: bootstrap zigbee2mqtt app and diagnostics 2025-12-29 15:51:07 +01:00
vhostctl.sh vhost-manager: add CLI helper and docs 2025-12-29 16:49:10 +01:00

SecuBox Scripts

English | Francais | 中文

Version: 1.1.0 Last Updated: 2026-03-20 Purpose: Automated scripts for SecuBox installation and documentation publishing


📜 Available Scripts

1. secubox-seed.sh

Purpose: Bootstrap a fresh OpenWrt installation with SecuBox packages

Usage:

# Remote install (recommended)
wget -O- https://repo.secubox.in/seed.sh | sh

# Or with curl
curl -fsSL https://repo.secubox.in/seed.sh | sh

# Local install with options
./scripts/secubox-seed.sh --profile=full

Installation Profiles:

Profile Description Packages
minimal Core only secubox-core, secubox-base, luci-theme-secubox
standard Core + Security + Network + crowdsec, haproxy, mitmproxy, ipblocklist
full Everything + tor, exposure, glances, master-link, p2p

Options:

  • --profile=PROFILE - Choose installation profile (minimal/standard/full)
  • --mirror=URL - Override repository URL
  • --dry-run - Show what would be installed
  • --skip-update - Skip opkg update

Environment Variables:

  • SECUBOX_PROFILE - Same as --profile
  • SECUBOX_MIRROR - Same as --mirror
  • SECUBOX_DRY_RUN=1 - Same as --dry-run
  • SECUBOX_SKIP_UPDATE=1 - Same as --skip-update

What it does:

  1. Detects system architecture (x86_64, aarch64, armv7l)
  2. Configures SecuBox package repository
  3. Updates package lists
  4. Installs packages based on selected profile
  5. Runs post-installation setup
  6. Enables and starts services

Requirements:

  • OpenWrt 24.10+
  • Internet connectivity
  • Root access

2. setup-wiki.sh

Purpose: Sync DOCS/ to GitHub Wiki

Usage:

./scripts/setup-wiki.sh

What it does:

  • Clones wiki repository
  • Creates Home page with navigation
  • Creates sidebar
  • Copies all documentation files
  • Fixes internal links for wiki format
  • Commits and pushes to wiki

Requirements:

  • Git installed
  • Wiki enabled in GitHub repository
  • SSH access to GitHub

Time: ~2 minutes


2. setup-github-pages.sh

Purpose: Create GitHub Pages site with MkDocs Material theme

Usage:

./scripts/setup-github-pages.sh

What it does:

  • Installs MkDocs if needed
  • Creates mkdocs.yml configuration
  • Generates docs/ directory structure
  • Creates beautiful home page
  • Copies all documentation files
  • Fixes internal links for web
  • Builds preview site

Requirements:

  • Python 3.x installed
  • pip3 installed
  • ~100MB disk space

Time: ~10 minutes (first time)


🎯 Which Script to Use?

Use setup-wiki.sh if:

  • You want quick setup (2 minutes)
  • Internal documentation only
  • Simple navigation is sufficient
  • No theming needed

Use setup-github-pages.sh if:

  • You want professional appearance
  • Public documentation
  • Custom domain support needed
  • Dark mode support wanted
  • Better mobile experience needed

Our recommendation: Use GitHub Pages for SecuBox's professional documentation.

See WIKI-SETUP-GUIDE.md for complete setup instructions.


🚀 Quick Start

Option 1: GitHub Wiki

# 1. Enable Wiki in GitHub settings
# 2. Run script
./scripts/setup-wiki.sh

# 3. View at:
# https://github.com/CyberMind-FR/secubox-openwrt/wiki
# 1. Install dependencies
sudo apt-get install python3 python3-pip
pip3 install mkdocs mkdocs-material pymdown-extensions

# 2. Run script
./scripts/setup-github-pages.sh

# 3. Test locally
mkdocs serve

# 4. Commit and push
git add mkdocs.yml docs/
git commit -m "Add GitHub Pages documentation"
git push

# 5. Enable in GitHub settings
# Settings → Pages → Source: master, Folder: /docs

# 6. View at:
# https://gkerma.github.io/secubox-openwrt/

📋 Script Features

setup-wiki.sh

Feature Status
Auto-clone wiki repo
Create Home page
Create sidebar navigation
Copy all docs
Fix internal links
Archive organization
Auto-commit & push
Error handling

setup-github-pages.sh

Feature Status
Dependency check
Auto-install MkDocs
Material theme
Dark/Light mode
Search functionality
Mermaid diagrams
Mobile responsive
Custom CSS
Archive organization
Build preview
Link fixing
Error handling

🔄 Updating Documentation

For GitHub Wiki

Just run the script again:

./scripts/setup-wiki.sh

All changes in DOCS/ will be synced to wiki.

For GitHub Pages

# Option 1: Full re-sync
./scripts/setup-github-pages.sh

# Option 2: Manual update
cp DOCS/CHANGED-FILE.md docs/changed-file.md
mkdocs build
git add docs/
git commit -m "Update docs"
git push

🐛 Troubleshooting

setup-wiki.sh

Error: "Wiki repository doesn't exist"

Error: "Permission denied"

  • Ensure SSH key is configured for GitHub
  • Test: ssh -T git@github.com

setup-github-pages.sh

Error: "mkdocs: command not found"

  • Install MkDocs: pip3 install mkdocs mkdocs-material
  • Or run script again (auto-installs)

Error: "No module named 'material'"

  • Install theme: pip3 install mkdocs-material

Error: "Build failed"

  • Check mkdocs.yml syntax
  • Test: mkdocs build --strict
  • Check Python version: python3 --version (need 3.6+)

📊 Comparison

Aspect Wiki Script Pages Script
Setup Time 2 min 10 min
Dependencies Git only Python, MkDocs
Result Basic wiki Professional site
Theme Default Material Design
Features Basic Advanced
Mobile OK Excellent
SEO Basic Good
Custom Domain No Yes

🎨 Customization

Wiki

Edit generated files in wiki repository:

git clone https://github.com/CyberMind-FR/secubox-openwrt.wiki.git
cd secubox-openwrt.wiki
# Edit _Sidebar.md, Home.md, etc.
git commit -am "Customize wiki"
git push

GitHub Pages

Edit mkdocs.yml and docs/stylesheets/extra.css:

# Change theme colors
vim mkdocs.yml

# Change custom styles
vim docs/stylesheets/extra.css

# Rebuild
mkdocs build

📞 Support

Script Issues:

  • Check error messages in script output
  • Verify dependencies installed
  • Ensure DOCS/ directory exists

Need Help:


📝 Script Maintenance

Update scripts:

# Edit scripts
vim scripts/setup-wiki.sh
vim scripts/setup-github-pages.sh

# Test changes
./scripts/setup-wiki.sh --dry-run  # (if implemented)

# Commit
git add scripts/
git commit -m "Update wiki setup scripts"
git push

Last Updated: 2025-12-28 Maintainer: CyberMind.fr License: Apache-2.0