init
This commit is contained in:
commit
3beb52ad22
31 changed files with 1224 additions and 0 deletions
6
files/systemd/system/logcompress.service
Normal file
6
files/systemd/system/logcompress.service
Normal file
|
@ -0,0 +1,6 @@
|
|||
[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 {} +
|
8
files/systemd/system/logcompress.timer
Normal file
8
files/systemd/system/logcompress.timer
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=Compress old logs in /var/log/%%Y daily
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
||||
[Timer]
|
||||
OnCalendar=2:00
|
Loading…
Add table
Add a link
Reference in a new issue