Metabolizer Blog Pipeline - integrated CMS for SecuBox: - Gitea: Mirror GitHub repos, store blog content - Streamlit: CMS app with markdown editor and live preview - HexoJS: Static site generator (clean → generate → publish) - Webhooks: Auto-rebuild on git push - Portal: Static blog served at /blog/ Pipeline: Edit in Streamlit CMS → Push to Gitea → Build with Hexo → Publish Packages: - secubox-app-streamlit: Streamlit server with LXC container - luci-app-streamlit: LuCI dashboard for Streamlit apps - secubox-app-metabolizer: CMS pipeline orchestrator CMS Features: - Two-column markdown editor with live preview - YAML front matter editor - Post management (drafts, publish, unpublish) - Media library with image upload - Git sync and Hexo build controls - Cyberpunk theme styling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
51 lines
892 B
Bash
51 lines
892 B
Bash
#!/bin/sh /etc/rc.common
|
|
# SecuBox Metabolizer - Blog CMS Pipeline
|
|
# Copyright (C) 2025 CyberMind.fr
|
|
|
|
START=96
|
|
STOP=10
|
|
USE_PROCD=1
|
|
|
|
PROG=/usr/sbin/metabolizerctl
|
|
CONFIG=metabolizer
|
|
|
|
start_service() {
|
|
local enabled
|
|
config_load "$CONFIG"
|
|
config_get enabled main enabled '0'
|
|
|
|
[ "$enabled" = "1" ] || {
|
|
echo "Metabolizer is disabled. Enable with: uci set metabolizer.main.enabled=1"
|
|
return 0
|
|
}
|
|
|
|
# Start webhook listener
|
|
local webhook_port
|
|
config_get webhook_port main webhook_port '8088'
|
|
|
|
procd_open_instance webhook
|
|
procd_set_param command "$PROG" webhook-listen
|
|
procd_set_param respawn 3600 5 5
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_close_instance
|
|
}
|
|
|
|
stop_service() {
|
|
# Webhook stops automatically when procd kills the process
|
|
:
|
|
}
|
|
|
|
service_triggers() {
|
|
procd_add_reload_trigger "$CONFIG"
|
|
}
|
|
|
|
reload_service() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
status() {
|
|
"$PROG" status
|
|
}
|