Here's a patch that allows the cron job to check for the existence of
either of apache1 or apache2 access.log file.

This should allow it work out of the box for either Apache 1.3.xx or
Apache 2.0.xx.

I had a similar problem as this bug/feature/wishlist and the
workaround I have for it is given below.  

Couldn't awstats be "plugged into" debconf so that it asks at install
time, where the access.log file is, and accordingly sets up the
cronjob ?  Or is it more complex then I think it is ? I'm not familiar
witht the package build process much.

The patch below seems pretty simple to me, and I'm a firm believer in
the KISS principle (Keep It Simple, Stupid!).

Hope it helps.



--- awstats.ksi 2005-02-16 21:50:40.000000000 -0500
+++ awstats     2005-03-31 09:59:33.000000000 -0500
@@ -1 +1 @@
-0,10,20,30,40,50 * * * * www-data [ -x /usr/lib/cgi-bin/awstats.pl -a -f 
/etc/awstats/awstats.conf -a -r /var/log/apache/access.log ] && 
/usr/lib/cgi-bin/awstats.pl -config=awstats -update >/dev/null
+0,10,20,30,40,50 * * * * www-data [ -x /usr/lib/cgi-bin/awstats.pl -a -f 
/etc/awstats/awstats.conf ] && [ -r /var/log/apache/access.log -o 
/var/log/apache2/access.log ] && /usr/lib/cgi-bin/awstats.pl -config=awstats 
-update >/dev/null


cheers,

    mehul




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to