printServer/scripts/systemd/printserver.logrotate
liufumingren fe23af7a7d chore(ops): 9.101 printServer 改为 systemd 托管
- 新增 printserver.service:开机自启(enabled)、崩溃自动拉起(Restart=always/RestartSec=5)、StartLimitBurst 防抖

- ExecStartPre 调用 release-orphan-running.cjs,启动前幂等释放断电/崩溃遗留的 running 任务

- KillMode=control-group:只连带本项目 frpc(/opt/printserver/frpc.ini),不影响系统 frpc.service

- 日志改 append(重启不丢),配 logrotate(daily + maxsize 200M / rotate 5 / copytruncate / 压缩)
2026-10-31 00:27:32 +08:00

13 lines
281 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/opt/printserver/run.log /opt/printserver/cameraOsd.log {
su root root
daily
maxsize 200M
rotate 5
missingok
notifempty
# systemd 用 append 方式持有 run.log 的 fd,copytruncate 才能安全切割
copytruncate
compress
delaycompress
}