scripts: consolidate Agent deployment and remove Probe packages
Use Agent for native, container, systemd and OpenWrt installations and signed updates. Remove retired Probe deployment templates and smoke scripts.
This commit is contained in:
1 parent
ad5efc62ff
commit
016dbc2bbf
30 files changed
+96
-1206
No files matched your search
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# procd service for moshiro-agent (OpenWrt). Installed as /etc/init.d/moshiro-agent.
|
||||
|
||||
START=95
|
||||
STOP=10
|
||||
USE_PROCD=1
|
||||
|
||||
PROG=/usr/lib/moshiro/moshiro-agent
|
||||
CONF=/etc/moshiro/agent.json
|
||||
|
||||
start_service() {
|
||||
[ -f "$CONF" ] || {
|
||||
logger -t moshiro-agent "$CONF not found: enroll first (install.sh agent --server URL --join TOKEN --name NAME)"
|
||||
return 1
|
||||
}
|
||||
procd_open_instance
|
||||
procd_set_param env LD_LIBRARY_PATH=/usr/lib/moshiro
|
||||
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 moshiro >/dev/null 2>&1 && procd_set_param user moshiro
|
||||
procd_close_instance
|
||||
}
|
||||
Reference in new issue
Block a user