secubox-deb/packages/secubox-core
CyberMind-FR b985db14ff
Some checks are pending
License Headers / check (push) Waiting to run
fix(core/#421): dirs-guard re-asserts /run/secubox 1777 root:root (RuntimeDirectory churn)
90+ services declare RuntimeDirectory=secubox, so systemd re-chowns the shared
socket parent to secubox:secubox 0755 on each start, locking out non-secubox
socket creators. Removing explicit chowns (#494) wasn't enough; the per-minute
dirs-guard now self-heals /run/secubox centrally instead of editing 90+ units.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 10:04:31 +02:00
..
debian fix(core/#421): dirs-guard re-asserts /run/secubox 1777 root:root (RuntimeDirectory churn) 2026-06-24 10:04:31 +02:00
systemd
tmpfiles.d
usr fix(core/#421): dirs-guard re-asserts /run/secubox 1777 root:root (RuntimeDirectory churn) 2026-06-24 10:04:31 +02:00
README.md

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