[Logwatch-Devel] Service Script self-configuration

Gary Allen Vollink Gary.Vollink at CorVu.com
Fri Jun 10 06:46:19 MST 2005

Is there an official stance on having a service script read that 
service's configuration file prior to doing it's work?  I haven't found 
any that currently do, but I was wondering, because I'm thinking of 
exploring this route.  The idea being to take logwatch one more step 
into 'it just works'.

I've been hacking around and noticed that most service scripts are based 
on "default shipping" configurations, but a large number of the messages 
that are being picked up and sorted in some form or fashion are 
configurable (not all packages, but some).  I don't know how easy it 
will/won't be.  Besides the difficulty in finding a package's 
configuration file, there's the overhead involved in parsing the 
configuration (which, when done across multiple services in a nightly 
run, could be cumbersome).

This could also be a case where some automatic 'makefile magic' might 
come in handy... use a Makefile.PL to build a script based on parameters 
found across the system... When a 'watched' log file is found, but 
hasn't been configured - run the Makefile magic - and continue 
processing with a slightly customized script.

What do you (all) think?

More information about the Logwatch-Devel mailing list