feat: add multi-user management and secure LuCI access

This commit is contained in:
benya
2026-07-19 23:10:07 +03:00
parent 80351ffce1
commit e6236f505c
55 changed files with 2876 additions and 321 deletions
@@ -8,6 +8,10 @@ PROG=/usr/bin/rmm-agent
CONFIG_FILE=/etc/rmm-agent.conf
start_service() {
[ -x /usr/libexec/rmm-agent-uci-sync ] && /usr/libexec/rmm-agent-uci-sync
config_load rmm-agent
config_get_bool enabled main enabled 0
[ "$enabled" -eq 1 ] || return 0
procd_open_instance
procd_set_param command /bin/sh "$PROG"
procd_set_param env CONFIG_FILE="$CONFIG_FILE"
@@ -18,6 +22,15 @@ start_service() {
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "rmm-agent"
}
stop_service() {
service_stop "$PROG"
rm -rf /tmp/rmm-agent.lock