- Add repo-deploy.sh script for staging and deploying packages - Replicate _all.ipk packages to all 6 architectures automatically - Add "Refresh Indexes" button to LuCI dashboard for local deployments - Add RPCD refresh method to regenerate Packages indexes on-device - Support architectures: aarch64_cortex-a72, aarch64_cortex-a53, aarch64_generic, x86_64, mips_24kc, mipsel_24kc Usage: ./secubox-tools/repo-deploy.sh stage --clean ./secubox-tools/repo-deploy.sh deploy root@192.168.255.1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
907 B
Bash
Executable File
49 lines
907 B
Bash
Executable File
#!/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
|
|
}
|