Add secubox-app-glances and luci-app-glances packages: secubox-app-glances: - LXC container with nicolargo/glances:latest-full Docker image - Web UI on port 61208, API on port 61209 - UCI configuration for monitoring options and alert thresholds - glancesctl management script luci-app-glances: - Dashboard view with service status and quick actions - Embedded Web UI view with iframe - Settings view for configuration - RPCD backend with proper ACL permissions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
43 lines
654 B
Bash
43 lines
654 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Glances system monitor init script
|
|
# Copyright (C) 2025-2026 CyberMind.fr
|
|
|
|
START=95
|
|
STOP=10
|
|
USE_PROCD=1
|
|
|
|
PROG=/usr/sbin/glancesctl
|
|
CONFIG=glances
|
|
|
|
start_service() {
|
|
local enabled
|
|
config_load "$CONFIG"
|
|
config_get enabled main enabled '0'
|
|
|
|
[ "$enabled" = "1" ] || return 0
|
|
|
|
procd_open_instance glances
|
|
procd_set_param command "$PROG" service-run
|
|
procd_set_param respawn 3600 5 5
|
|
procd_set_param stdout 1
|
|
procd_set_param stderr 1
|
|
procd_close_instance
|
|
}
|
|
|
|
stop_service() {
|
|
"$PROG" service-stop
|
|
}
|
|
|
|
service_triggers() {
|
|
procd_add_reload_trigger "$CONFIG"
|
|
}
|
|
|
|
reload_service() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
status() {
|
|
"$PROG" status
|
|
}
|