handle php logrotate

This commit is contained in:
Ludovic Cartier
2025-09-24 15:37:04 +02:00
parent e9dae1dd0b
commit 140610f8ee
4 changed files with 47 additions and 0 deletions

View 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
}