# Installed as /etc/logrotate.d/ptpanel
/var/log/ptpanel/sites/*.log {
    daily
    rotate 14
    missingok
    notifempty
    compress
    delaycompress
    sharedscripts
    postrotate
        [ -s /run/nginx.pid ] && kill -USR1 "$(cat /run/nginx.pid)" || true
    endscript
}

/var/log/ptpanel/waf/*.json {
    daily
    rotate 7
    missingok
    notifempty
    compress
    delaycompress
    copytruncate
}

/var/log/ptpanel/panel-*.log {
    weekly
    rotate 8
    missingok
    notifempty
    compress
    delaycompress
    sharedscripts
    postrotate
        [ -s /run/nginx.pid ] && kill -USR1 "$(cat /run/nginx.pid)" || true
    endscript
}
