logrotate.service 704 B

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