secubox-openwrt/package/secubox/secubox-app-peertube/files/etc/init.d/peertube
CyberMind-FR dcc34c8bf6 feat(peertube): Add PeerTube video platform package
New secubox-app-peertube package for self-hosted video streaming:

- LXC Debian container with PostgreSQL, Redis, Node.js, FFmpeg
- peertubectl control script with install/update/emancipate commands
- UCI configuration for server, transcoding, live streaming, storage
- procd init script with respawn support
- HAProxy integration with WebSocket and extended timeouts
- RTMP live streaming support (optional)
- S3/object storage support (configurable)
- Admin commands for user management
- Backup/restore functionality

Commands:
  peertubectl install              - Create LXC container with full stack
  peertubectl emancipate <domain>  - Full exposure with HAProxy + ACME
  peertubectl admin create-user    - Create user accounts
  peertubectl live enable          - Enable RTMP live streaming
  peertubectl backup/restore       - Database backup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 05:43:22 +01:00

36 lines
563 B
Bash

#!/bin/sh /etc/rc.common
START=95
STOP=10
USE_PROCD=1
SERVICE_BIN="/usr/sbin/peertubectl"
start_service() {
local enabled
config_load peertube
config_get enabled main enabled 0
[ "$enabled" = "1" ] || return 0
procd_open_instance
procd_set_param command "$SERVICE_BIN" service-run
procd_set_param respawn 3600 5 5
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
stop_service() {
"$SERVICE_BIN" service-stop >/dev/null 2>&1
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "peertube"
}