handle php logrotate
This commit is contained in:
22
templates/php-fpm.logrotate.j2
Normal file
22
templates/php-fpm.logrotate.j2
Normal file
@@ -0,0 +1,22 @@
|
||||
daily
|
||||
rotate 31
|
||||
compress
|
||||
compresscmd /bin/bzip2
|
||||
uncompresscmd /bin/bunzip2
|
||||
compressoptions -9
|
||||
compressext .bz2
|
||||
missingok
|
||||
dateext
|
||||
dateformat -%Y%m%d-%s
|
||||
dateyesterday
|
||||
notifempty
|
||||
sharedscripts
|
||||
su root adm
|
||||
|
||||
/var/log/php/*/*/php-slow.log
|
||||
/var/log/php/*/*/php-errors.log
|
||||
{
|
||||
postrotate
|
||||
if [ -d /run/systemd/system ]; then systemctl kill -s HUP rsyslog.service; else invoke-rc.d rsyslog rotate > /dev/null; fi
|
||||
endscript
|
||||
}
|
||||
Reference in New Issue
Block a user