Add device maintenance actions
This commit is contained in:
23
agent/openwrt/rmm-agent-go-production.init
Normal file
23
agent/openwrt/rmm-agent-go-production.init
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/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 "$PROG" -config "$CONFIG_FILE"
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_set_param term_timeout 15
|
||||
procd_set_param respawn 3600 5 5
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
service_stop "$PROG"
|
||||
rm -rf /tmp/rmm-agent.lock
|
||||
}
|
||||
Reference in New Issue
Block a user