Load the node server settings from a .env file
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>
This commit is contained in:
1 parent
f6ffbde518
commit
ef1c5b42ab
14 files changed
+1086
-106
No files matched your search
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=网络质量探测节点
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
# 程序和 .env 放在同一目录。端口、口令、模式都改 .env,不要改这一行。
|
||||
WorkingDirectory=/opt/netquality
|
||||
ExecStart=/opt/netquality/netquality-reflector
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in new issue
Block a user