1

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?

1 Answer 1

4

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.

1
  • Well answered :) +1
    – Arenstar
    Nov 14, 2010 at 3:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .