/var/log/lighttpd-x5/*.log {
        size 100M
        missingok
        rotate 3
        compress
        delaycompress
        notifempty
        sharedscripts
        postrotate
           if [ -f /var/run/lighttpd-x5.pid ] && ps --pid $(cat /var/run/lighttpd-x5.pid) > /dev/null 2>&1; then \
             if [ -x /usr/sbin/invoke-rc.d ]; then \
                invoke-rc.d lighttpd-x5 reload > /dev/null 2>&1; \
             else \
                /etc/init.d/lighttpd-x5 reload > /dev/null 2>&1; \
             fi; \
           fi;
        endscript
}
