secubox-deb/packages/secubox-core
2026-06-17 09:33:26 +02:00
..
debian fix(core): stop clobbering /var/lib+/usr/share/secubox to 0750 + ship secubox-dirs-guard timer; toolbox: stream_inject default on (closes #630) 2026-06-17 09:33:26 +02:00
systemd fix(core): stop clobbering /var/lib+/usr/share/secubox to 0750 + ship secubox-dirs-guard timer; toolbox: stream_inject default on (closes #630) 2026-06-17 09:33:26 +02:00
tmpfiles.d fix(core): Set /run/secubox world-writable for service sockets 2026-04-04 08:14:51 +02:00
usr fix(core): stop clobbering /var/lib+/usr/share/secubox to 0750 + ship secubox-dirs-guard timer; toolbox: stream_inject default on (closes #630) 2026-06-17 09:33:26 +02:00
README.md feat(secubox-core): Integrate LED heartbeat into core package (ref #39) 2026-05-07 07:15:11 +02:00

SecuBox Core

Core package for SecuBox-Deb platform. Provides shared libraries, utilities, and base services.

Components

Python Library (secubox_core)

Shared Python modules for all SecuBox services:

  • auth.py - JWT authentication helpers
  • config.py - TOML configuration loader
  • logger.py - Unified logging
  • system.py - System utilities
  • kiosk.py - Kiosk mode helpers

Services

Service Description
secubox-core.service Core initialization
secubox-runtime.service Runtime directory setup
secubox-led-heartbeat.service LED heartbeat indicator

CLI Tools

  • /usr/bin/secubox - Main SecuBox CLI
  • /usr/bin/secubox-firstboot - First boot initialization
  • /usr/sbin/secubox-led-heartbeat - LED heartbeat daemon

LED Heartbeat

Visual system status indicator using IS31FL3199 RGB LEDs on MOCHAbin.

Configuration

Environment variables in systemd service:

Environment=LED_COLOR=green   # red, green, or blue
Environment=LED_NUM=1         # LED number (1-3)

Pattern

Double-pulse heartbeat pattern:

  • ON 150ms → OFF 150ms → ON 150ms → OFF 700ms (repeat)

Manual Control

# Start/stop
systemctl start secubox-led-heartbeat
systemctl stop secubox-led-heartbeat

# Test LED manually
echo 255 > /sys/class/leds/green:led1/brightness
echo 0 > /sys/class/leds/green:led1/brightness

Installation

apt install secubox-core

Dependencies

  • python3
  • python3-toml
  • i2c-tools (for LED control)

Files

/usr/lib/python3/dist-packages/secubox_core/
/usr/bin/secubox
/usr/bin/secubox-firstboot
/usr/sbin/secubox-led-heartbeat
/usr/lib/systemd/system/secubox-*.service
/usr/share/secubox-core/nginx/
/etc/nginx/secubox.d/

License

Proprietary - CyberMind / ANSSI CSPN candidate