-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 31-03-2005 17:55, Mehul N. Sanghvi wrote: > 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
Your addition is not POSIX (the "-o" in the test should be two tests combined with "||" instead), but that's not the real problem. The real problem is that as currently packaged, awstats do not work with apache 2.x out of the box. Your tweak is fine for local use, but does not make the package work with Apache 2.x. So if included your proposed patch, there'll soon be another bugreport that the apache2 logfile is not set in the default awstats config... The cron file is a conffile. That means you can edit it and the package must respect your changes. - Jonas - -- * Jonas Smedegaard - idealist og Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ - Enden er nÃr: http://www.shibumi.org/eoti.htm -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCTCmUn7DbMsAkQLgRArIQAJ0ZJcxPYGlWek3uWGu0U5ALwUr66gCgl52s qf3GGBrLGaZxg5+wuGDu0b8= =CYQs -----END PGP SIGNATURE-----