fix(systemd): pet watchdog when WATCHDOG_USEC missing; StartLimitInterval for old systemd
Embedded units may set WatchdogSec but omit WATCHDOG_USEC; SD_NOTIFY_INTERVAL was 0 so no WATCHDOG=1 was sent and systemd killed the main process after ~60s. Replace StartLimitIntervalSec with StartLimitInterval= for older systemd (journal warning). Made-with: Cursor
This commit is contained in:
@@ -195,7 +195,8 @@ WorkingDirectory=$INSTALL_DIR
|
||||
# 重启策略
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StartLimitIntervalSec=300
|
||||
# 旧版 systemd 不认 StartLimitIntervalSec,用 StartLimitInterval=(秒)
|
||||
StartLimitInterval=300
|
||||
StartLimitBurst=10
|
||||
|
||||
# 优雅停止(10s 内 SIGTERM,超时 SIGKILL)
|
||||
|
||||
Reference in New Issue
Block a user