logrotate support

This commit is contained in:
bunkerity
2020-08-30 21:40:13 +02:00
parent f30a06d943
commit 1aa1dcf50d
7 changed files with 58 additions and 12 deletions

19
logs/logrotate.conf Normal file
View File

@@ -0,0 +1,19 @@
/var/log/messages /var/log/*.log /var/log/clamav/*.log /var/log/php7/*.log {
# compress old files using gzip
compress
# rotate everyday
daily
# remove old logs after X days
maxage %LOGROTATE_MAXAGE%
# no errors if a file is missing
missingok
# disable mailing
nomail
# mininum size of a logfile before rotating
minsize %LOGROTATE_MINSIZE%
}

2
logs/syslog.conf Normal file
View File

@@ -0,0 +1,2 @@
local0.* /var/log/nginx.log
local1.* /var/log/php.log