feat(install): default to Go agent binary from release agent-v0.6.8, drop Node.js dependency; NG_AGENT_IMPL=node fallback via run.sh; shell-only enroll JSON; units ExecStart the Go binary
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
description="NexusGate node agent"
|
||||
command="/opt/nexusgate-agent/run.sh"
|
||||
command="/opt/nexusgate-agent/nexusgate-agent"
|
||||
command_background="yes"
|
||||
pidfile="/run/nexusgate-agent.pid"
|
||||
output_log="/var/log/nexusgate/agent.log"
|
||||
error_log="/var/log/nexusgate/agent-error.log"
|
||||
|
||||
# Go 二进制直接从环境变量读取 NG_CONTROLLER/NG_AGENT_KEY;OpenRC 不读
|
||||
# /etc/nexusgate/agent.env,这里在服务脚本里手动 source 并导出。
|
||||
if [ -f /etc/nexusgate/agent.env ]; then
|
||||
set -a
|
||||
. /etc/nexusgate/agent.env
|
||||
set +a
|
||||
fi
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use nexusgate-sing-box
|
||||
|
||||
Reference in New Issue
Block a user