- Fix config path: .conf → .yml - Add /etc/logcorrelator to ReadWritePaths (config reload) - Add TimeoutStartSec=10 (matches systemd expectations) - Add TimeoutStopSec=30 (aligned with code shutdown timeout) These changes ensure proper systemd integration and security. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
28 lines
527 B
Desktop File
28 lines
527 B
Desktop File
[Unit]
|
|
Description=logcorrelator service
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=logcorrelator
|
|
Group=logcorrelator
|
|
ExecStart=/usr/bin/logcorrelator -config /etc/logcorrelator/logcorrelator.yml
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
|
|
# Security hardening
|
|
NoNewPrivileges=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
ReadWritePaths=/var/log/logcorrelator /var/run/logcorrelator /etc/logcorrelator
|
|
|
|
# Resource limits
|
|
LimitNOFILE=65536
|
|
|
|
# Systemd timeouts
|
|
TimeoutStartSec=10
|
|
TimeoutStopSec=30
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|