Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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.

share|improve this answer
    
Well answered :) +1 –  Arenstar Nov 14 '10 at 3:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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