logrotate.service 695 B

1234567891011121314151617181920212223242526
  1. [Unit]
  2. Description=Rotate log files
  3. Documentation=man:logrotate(8) man:logrotate.conf(5)
  4. ConditionACPower=true
  5. [Service]
  6. Type=oneshot
  7. ExecStart=/usr/sbin/logrotate /etc/logrotate.conf
  8. # performance options
  9. Nice=19
  10. IOSchedulingClass=best-effort
  11. IOSchedulingPriority=7
  12. # hardening options
  13. # details: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
  14. # no ProtectHome for userdir logs
  15. # no PrivateNetwork for mail deliviery
  16. # no ProtectKernelTunables for working SELinux with systemd older than 235
  17. # no MemoryDenyWriteExecute for gzip on i686
  18. PrivateDevices=true
  19. PrivateTmp=true
  20. ProtectControlGroups=true
  21. ProtectKernelModules=true
  22. ProtectSystem=full
  23. RestrictRealtime=true