feat: add multi-user management and secure LuCI access
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
config agent 'main'
|
||||
option enabled '0'
|
||||
option server_url 'https://rmm.example.com'
|
||||
option interval_seconds '30'
|
||||
option check_targets '1.1.1.1 8.8.8.8'
|
||||
option tunnel_identity_file '/etc/rmm-agent/tunnel_key'
|
||||
option allow_insecure_http '0'
|
||||
option reset_identity '0'
|
||||
option migration_complete '0'
|
||||
@@ -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 "$PROG" -config "$CONFIG_FILE"
|
||||
procd_set_param stdout 1
|
||||
@@ -17,6 +21,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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SERVER_URL="http://127.0.0.1:8080"
|
||||
ENROLLMENT_TOKEN="dev-enroll-token"
|
||||
SERVER_URL="https://rmm.example.com"
|
||||
ENROLLMENT_TOKEN=""
|
||||
INTERVAL_SECONDS="30"
|
||||
CHECK_TARGETS="1.1.1.1 8.8.8.8"
|
||||
TUNNEL_IDENTITY_FILE="/etc/rmm-agent/tunnel_key"
|
||||
|
||||
Reference in New Issue
Block a user