/var/log/ptaf_nginx/*/*/*.log { daily maxsize 200M missingok rotate 3 maxage 15 compress notifempty create 777 root root su root root sharedscripts postrotate CONTAINER_IDS=$(docker ps --filter "status=running" --filter "name=ptaf*" --format='{{.ID}}') for CONTAINER_ID in $CONTAINER_IDS; do docker exec "$CONTAINER_ID" /opt/ptaf/bin/ptaf-nginx -s reopen done find /var/log/ptaf_nginx -type f -name "*.log" -size 0 -mmin +60 -delete 2>/dev/null || true endscript }