/var/log/lighttpd/access.log {
    rotate 5
    daily
    missingok
    notifempty
    compress
    prerotate
{% if devel %}
        /usr/bin/copr_log_hitcounter.py /var/log/lighttpd/access.log --ignore-subnets 172.25.144.0/20 209.132.184.33/24 &>>/var/log/copr-backend/hitcounter-logrotate.log || :
{% else %}
        /usr/bin/copr_log_hitcounter.py /var/log/lighttpd/access.log --ignore-subnets 172.25.80.0/20 209.132.184.33/24 &>>/var/log/copr-backend/hitcounter-logrotate.log || :
{% endif %}
    endscript
    postrotate
        /usr/bin/killall -HUP lighttpd &>/dev/null || :
    endscript
}

/var/log/lighttpd/error.log {
    rotate 5
    missingok
    notifempty
    compress
    postrotate
        /usr/bin/killall -HUP lighttpd &>/dev/null || :
    endscript
}
