[Pkg-awstats-devel] Bug#399029: log format assumptions

Andreas Henriksson andreas at fatal.se
Wed May 21 19:00:10 UTC 2008


[...awstats default logformat does not match apache2 default...]

On Sat, Jan 13, 2007 at 01:15:25PM -0500, Charles Fry wrote:
> Does anyone have a suggestion for changing this in a
> backwords-compatible manner?

Maybe the package preinst script can do something like this:

LOGFORM=$(grep ^LogFormat /etc/awstats/awstats.conf | tail -n 1)
if [ "$LOGFORM" != "LogFormat=1" ] && \
	[ "$(grep -c ^LogFormat /etc/awstats/awstats.conf.local)" == "0" ]
then
	echo "$LOGFORM" >> /etc/awstats/awstats.conf.local
fi

This will not handle any possible awstats.foo.bar.conf file which
includes the awstats.conf though. A debian/NEWS entry might be a good
idea.

--
Regards,
Andreas Henriksson





More information about the Pkg-awstats-devel mailing list