fix(gateway): avoid restarting stopped systemd services

This commit is contained in:
chengyongru authored and chengyongru committed 2026-11-10 23:47:23 +08:00
1 parent 62c05e7f7e
commit 0ce335bf12
5 files changed
+16 -10

No files matched your search

+2 -1
View File
@@ -266,7 +266,8 @@ def _systemd_unit_content(
"Type=simple",
f"WorkingDirectory={_systemd_quote(str(working_directory))}",
f"ExecStart={quoted_command}",
"Restart=always",
"Restart=on-failure",
"SuccessExitStatus=SIGTERM",
"RestartSec=10",
"Environment=PYTHONUNBUFFERED=1",
"NoNewPrivileges=yes",