New package secubox-app-streamlit-launcher: - Lazy loading: apps start only when accessed - Idle shutdown: stop apps after configurable timeout (default 30min) - Memory management: force-stop low-priority apps when memory low - Priority system: higher priority = keep running longer - Always-on mode for critical apps - Procd daemon with respawn CLI: streamlit-launcherctl - daemon: run background manager - status/list: show app states and idle times - start/stop: manual app control - priority: set app priority (1-100) - check/check-memory: manual checks Updated slforge with launcher integration: - slforge launcher status/priority/always-on commands - Access tracking on app start - README documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
32 lines
550 B
Bash
32 lines
550 B
Bash
#!/bin/sh /etc/rc.common
|
|
|
|
START=95
|
|
STOP=10
|
|
USE_PROCD=1
|
|
|
|
PROG=/usr/sbin/streamlit-launcherctl
|
|
|
|
start_service() {
|
|
local enabled
|
|
config_load streamlit-launcher
|
|
config_get enabled global enabled '0'
|
|
|
|
[ "$enabled" = "1" ] || return 0
|
|
|
|
procd_open_instance
|
|
procd_set_param command "$PROG" daemon
|
|
procd_set_param respawn 3600 5 5
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_close_instance
|
|
}
|
|
|
|
service_triggers() {
|
|
procd_add_reload_trigger "streamlit-launcher"
|
|
}
|
|
|
|
reload_service() {
|
|
stop
|
|
start
|
|
}
|