chore: initial project import
This commit is contained in:
commit
26620707a0
347 files changed
+56172
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# procd service for monitor-probe (OpenWrt). Installed as /etc/init.d/monitor-probe.
|
||||
|
||||
START=95
|
||||
STOP=10
|
||||
USE_PROCD=1
|
||||
|
||||
PROG=/usr/lib/monitor/monitor-probe
|
||||
CONF=/etc/monitor/probe.json
|
||||
|
||||
start_service() {
|
||||
[ -f "$CONF" ] || {
|
||||
logger -t monitor-probe "$CONF not found: download it from the panel (POST /api/admin/probe/identity)"
|
||||
return 1
|
||||
}
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" --config "$CONF"
|
||||
# respawn: threshold(s) timeout(s) retry (0 = forever)
|
||||
procd_set_param respawn 3600 5 0
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_set_param limits nofile=4096
|
||||
# Run unprivileged when the installer could create the user (busybox adduser may be missing)
|
||||
id monitor >/dev/null 2>&1 && procd_set_param user monitor
|
||||
procd_close_instance
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/etc/monitor/
|
||||
Reference in new issue
Block a user