/var/log/syncwerk/restapi.log /var/log/syncwerk/server.log {
    daily
    rotate 14
    compress
    delaycompress
    missingok
    notifempty
    create 0640 syncwerk nogroup
}

/var/log/syncwerk/restapi-proxy.log /var/log/syncwerk/webapp.log /var/log/syncwerk/webdav.log /var/log/syncwerk/onlyoffice.log {
    daily
    rotate 14
    compress
    delaycompress
    missingok
    notifempty
    create 0640 www-data nogroup
    sharedscripts
    postrotate
        if [ -s /run/nginx.pid ]; then
            kill -USR1 "$(cat /run/nginx.pid)" 2>/dev/null || true
        fi
    endscript
}
