[Pkg-awstats-devel] cron job

Jonas Smedegaard dr at jones.dk
Thu Apr 27 16:07:38 UTC 2006


On Tue, 25 Apr 2006 20:44:43 -0400 Charles Fry wrote:

> At this point it looks like the three outstanding Normal bugs are all
> related to the cron job. At this point think we should start looking
> for ways to address the issues raised in the bugs (with a focus, I
> believe, on #341308).
> 
> Any ideas or preferences on how to approach this?

I'd say we switch to static pages by default, and lower the severity of
requests for more fancy log handling to wishlist.


I imagine something like the following (but a simpler approach is
probably more sane if you are not interested in carrying it out mostly
- I am happy to provide suggestions and proof-read, but do not have
time to set it all up):


Install the awstats CGI script below /usr/lib/awstats (the current
location below .../cgi-bin/ is wrong anyway with the policy 10.5 change
today to use .../cgi-lib/ instead).


Current cron job droppped, and a debconf note asking to purge it
immediately (to avoid flooding email due to wrong CGI location).


A new file /etc/default/awstats containing the following:

-----
# Set to hourly, daily, weekly or monthly, or comment out to disable
update_frequency="weekly"
-----


Perhaps (now using debconf anyway) a debconf question about frequency.
If doing so, the file must *not* be installed the standard way (as it
then gets marked as a conffile that must not be edited by packaging
scripts), but instead need to be generated/updated in postinst.


New cron jobs /etc/cron.{hourly,daily,weekly,monthly}/awstats executing
a new shell script /usr/sbin/update-awstats after (optionally - it must
tolerate the file not existing) sourcing /etc/default/awstats.


NEWS.Debian item informing about change of CGI location and suggest
disabling the default cron job if using a different setup locally.


/usr/sbin/update-awstats simply invokes awstats (and can be improved
later on, without upsetting people as was the case with updating the
cronjob due to being a conffile).


Later awstats (or 3rd party packages) can perhaps provide an
alternative update-awstats script (using dpkg-divert) to handle
multiple log files or whatever...


Also, awstats can later provide an awstats-cgi package which simply
symlinks the CGI script into /usr/lib/cgi-lib/ and depends on the
virtual httpd-cgi.


 - 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-awstats-devel/attachments/20060427/13620ca3/attachment.pgp


More information about the Pkg-awstats-devel mailing list