Add two new packages for self-hosted brewing controller support: secubox-app-picobrew: - LXC container-based PicoBrew Server installation - Alpine Linux rootfs with Python/Flask environment - UCI configuration for port, memory, brewing defaults - procd service management with respawn - Commands: install, uninstall, update, status, logs, shell luci-app-picobrew: - Modern dashboard UI with SecuBox styling - Service controls (start/stop/restart/install/update) - Real-time status monitoring and logs - Settings page for server and brewing configuration - RPCD backend with full API coverage Supports PicoBrew Zymatic, Z, Pico C, and Pico Pro devices. Repository: https://github.com/CyberMind-FR/picobrew-server Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
46 lines
745 B
Bash
46 lines
745 B
Bash
#!/bin/sh /etc/rc.common
|
|
# SecuBox PicoBrew Server - Homebrew brewing controller
|
|
# Copyright (C) 2025 CyberMind.fr
|
|
|
|
START=95
|
|
STOP=10
|
|
USE_PROCD=1
|
|
|
|
PROG=/usr/sbin/picobrewctl
|
|
CONFIG=picobrew
|
|
|
|
start_service() {
|
|
local enabled
|
|
config_load "$CONFIG"
|
|
config_get enabled main enabled '0'
|
|
|
|
[ "$enabled" = "1" ] || {
|
|
echo "PicoBrew is disabled. Enable with: uci set picobrew.main.enabled=1"
|
|
return 0
|
|
}
|
|
|
|
procd_open_instance
|
|
procd_set_param command "$PROG" service-run
|
|
procd_set_param respawn 3600 5 5
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_close_instance
|
|
}
|
|
|
|
stop_service() {
|
|
"$PROG" service-stop
|
|
}
|
|
|
|
service_triggers() {
|
|
procd_add_reload_trigger "$CONFIG"
|
|
}
|
|
|
|
reload_service() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
status() {
|
|
"$PROG" status
|
|
}
|