Files
NexusGate/openrc/nexusgate-agent
T

26 lines
630 B
Plaintext
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/sbin/openrc-run
description="NexusGate node agent"
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
}
start_pre() {
checkpath --directory --mode 0750 /var/log/nexusgate
}