Initial OpenWrt RMM implementation
This commit is contained in:
20
agent/package/rmm-agent/files/etc/init.d/rmm-agent
Normal file
20
agent/package/rmm-agent/files/etc/init.d/rmm-agent
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=95
|
||||
STOP=10
|
||||
USE_PROCD=1
|
||||
|
||||
PROG=/usr/bin/rmm-agent
|
||||
CONFIG_FILE=/etc/rmm-agent.conf
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command /bin/sh "$PROG"
|
||||
procd_set_param env CONFIG_FILE="$CONFIG_FILE"
|
||||
procd_set_param respawn 3600 5 5
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
service_stop "$PROG"
|
||||
}
|
||||
7
agent/package/rmm-agent/files/etc/rmm-agent.conf
Normal file
7
agent/package/rmm-agent/files/etc/rmm-agent.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
SERVER_URL="http://127.0.0.1:8080"
|
||||
ENROLLMENT_TOKEN="dev-enroll-token"
|
||||
INTERVAL_SECONDS="30"
|
||||
CHECK_TARGETS="1.1.1.1 8.8.8.8"
|
||||
TUNNEL_IDENTITY_FILE="/etc/rmm-agent/tunnel_key"
|
||||
DEVICE_ID=""
|
||||
DEVICE_TOKEN=""
|
||||
Reference in New Issue
Block a user