fix(agent): pangolin-agent.service 补 ExecReload,使 systemctl reload 走 SIGHUP 热重载
[Service] 块只有 ExecStart,没有 ExecReload——systemctl reload pangolin-agent 返回「Job type reload is not applicable」,运维只能退回 restart,而 restart 会让 agent 进程内 s.started 复位为 false,首次渲染走冷启动 systemctl restart sing-box, 瞬断全部在线用户。这正是 Task 5 SIGHUP 热重载路径存在的意义所在,却因为 unit 文件 缺一行而完全走不通。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,10 @@ StartLimitIntervalSec=0
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/pangolin-agent/agent.env
|
||||
ExecStart=/usr/local/bin/pangolin-agent
|
||||
# SIGHUP → agent 重读节点本地配置(acl.json/warp.json)并热重渲染,不冷启动
|
||||
# sing-box、不踢在线用户。没有这行,`systemctl reload` 会报「Job type reload is
|
||||
# not applicable」,运维只能退回 restart(整进程重启,sing-box 冷启动瞬断全员)。
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
# 始终自愈(崩溃/被依赖停后都拉起);RestartSec 做退避。
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
Reference in New Issue
Block a user