- luci-app-streamlit-forge: Streamlit app publishing platform - Category: productivity, runtime: lxc - Templates, SSL exposure, mesh publishing - luci-app-rezapp: Docker to LXC app converter - Category: system, runtime: native - Catalog browsing, package generation - Updated new_releases section - Total plugins: 37 → 39 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
907 B
Bash
49 lines
907 B
Bash
#!/bin/sh /etc/rc.common
|
|
|
|
START=99
|
|
STOP=10
|
|
|
|
USE_PROCD=1
|
|
|
|
EXTRA_COMMANDS="status"
|
|
EXTRA_HELP=" status Show all app instances status"
|
|
|
|
start_service() {
|
|
config_load streamlit-forge
|
|
|
|
local enabled
|
|
config_get enabled main enabled '0'
|
|
[ "$enabled" = "1" ] || return 0
|
|
|
|
# Start all enabled app instances
|
|
config_foreach start_app app
|
|
}
|
|
|
|
start_app() {
|
|
local section="$1"
|
|
local enabled name port
|
|
|
|
config_get enabled "$section" enabled '0'
|
|
[ "$enabled" = "1" ] || return 0
|
|
|
|
config_get name "$section" name "$section"
|
|
config_get port "$section" port '8501'
|
|
|
|
echo "Starting Streamlit app: $name on port $port"
|
|
slforge start "$name" --quiet
|
|
}
|
|
|
|
stop_service() {
|
|
# Stop all running app instances
|
|
for pid_file in /var/run/streamlit-*.pid; do
|
|
[ -f "$pid_file" ] || continue
|
|
local pid=$(cat "$pid_file")
|
|
[ -n "$pid" ] && kill "$pid" 2>/dev/null
|
|
rm -f "$pid_file"
|
|
done
|
|
}
|
|
|
|
status() {
|
|
slforge status
|
|
}
|