clone 590074 -1 -2 -3
reassign -1 apache2
reassign -2 lighttpd
reassign -3 nginx
retitle -1 add pre-rotate hook to logrotate script
retitle -2 add pre-rotate hook to logrotate script
retitle -3 add pre-rotate hook to logrotate script
severity -1 wishlist
severity -2 wishlist
severity -3 wishlist
thanks

Please add something like the following snippet to the logrotate script for your package:

prerotate
        if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
                run-parts /etc/logrotate.d/httpd-prerotate; \
        fi; \
endscript

(or some suitable directory other than the one suggested; I'm not sure what Debian naming conventions are.)

This would be greatly helpful to log-parsing packages such as awstats, which can then set up hooks to processes these logs before they get rotated (see #590074 for an example).

X

On 23/07/10 17:03, Jonas Smedegaard wrote:
On Fri, Jul 23, 2010 at 02:57:43PM +0100, Ximin Luo wrote:
On 23/07/10 14:31, Jonas Smedegaard wrote:
I suggest to a) split the current cron job into infrequent and
frequent jobs, b) make the frequent one optional (ideally through
debconf), and c) invoke the infrequent job also (or instead?) as a
logrotate hook.


How does that sound?

Yeah, that works. Though looking at the current script, there's not
really much need to split it up.

The main problem is to do the logrotate hook itself - ideally you'd
add it directly to the webserver entry rather than a new awstats
entry. Is that going to be a pain - editing another package's
configuration files? I dunno what infrastructure / policy Debian has
for this sort of thing.

Ah, yes. That was it: Not doable!

Or more accurately: It needs implemented in webserver packages that this
awstats package can hook into - not doable in awstats alone.


- Jonas





--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to