I have created a debian package that sets up awstats and the required scripts for a couple of hostnames in a server I have.
My problem is with logrotate, I already update the stats with a cron job I set up on package install but I need to update stats on server logs prerotate, gthe server I'm using, lighttpd, already has an entry on /etc/logrotate.d/.

I guess I could just sed the file and add the prerotate update stats endscript but that wouldn't work later when the package gets uninstalled, and I doubt it'll survive a lighttpd package update.

Any ideas?


Debian won't touch your conffiles once you have edited them; you can edit lighttpd's logrotate script all you want. You might get prompted at upgrades if both lighttpd and you have updated the file.

If you want changes to be applied on your own package's install, divert the lighttpd conffile in your package's install scripts, and install the awstats-aware version in its place. Look up dpkg-divert.

  • Well answered :) +1 – Arenstar Nov 14 '10 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.