The reflector and probe node read .env next to the binary and from the working directory. Command-line flags still override environment variables, which override the file. Missing .env files are ignored, and the packaged defaults stay TCP 19090 and UDP 19091. Co-authored-by: yanjiu0721 <yanjiu0721@users.noreply.github.com>
23 lines
630 B
Desktop File
23 lines
630 B
Desktop File
[Unit]
|
|
Description=NetQuality probe node and reflector
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
# 端口和口令写在 /opt/netquality/.env。
|
|
# 这份服务通过环境变量把模式固定成 both(反射 + 节点),会盖过 .env 里的 NQ_MODE。
|
|
# 节点口令请改 .env 的 NQ_NODE_TOKEN,不要把真实口令写进本文件。
|
|
WorkingDirectory=/opt/netquality
|
|
Environment=NQ_MODE=both
|
|
ExecStart=/opt/netquality/netquality-reflector
|
|
Restart=on-failure
|
|
RestartSec=2
|
|
NoNewPrivileges=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
PrivateTmp=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|