ansible-role-system/files/systemd/system/logcompress.service
Denis Knauf 3beb52ad22 init
2021-04-10 22:11:19 +02:00

6 lines
208 B
Desktop File

[Unit]
Description=Compress old logs in /var/log/%%Y
[Service]
Type=oneshot
ExecStart=/usr/bin/find /var/log/ -regex '/var/log/2[0-9][0-9][0-9]/2[0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]' -mtime +0 -exec xz {} +