[Pkg-awstats-devel] I'd better leave

Sergey B Kirpichev skirpichev at gmail.com
Fri Mar 18 14:41:14 UTC 2011


On Thu, Mar 17, 2011 at 12:04 AM, Jonas Smedegaard <dr at jones.dk> wrote:
>  * avoid using a tempfile
>  * avoid changing directory

+1

>  * avoid using ls

Why?  Both find & ls are in the packages with priority "required".  And your
example with find looks a bit complex, if it's imlemented properly.  Remember,
you have to use -maxdepth option to avoid matching awstats.*.conf files in
subdirectories (backup files, for example).

>  * avoid hardcoded paths for utilities in default $PATH

+1, but this can have some negative security impact.

>  * not require certain order of processing

+1, but I'm not certain - awstats.conf looks a bit
defferent from others awstats.sitename.conf.  And, probably,
sometimes we can drop it support.  It's not bad to have a
special case for this file.

>  * use $() instead of backticks
>  * quote variables more aggressively

+1

> More fundamentally, however, I dislike that update.sh script being hooked
> onto to cronjob in the first place, because it makes us then promise to
> maintain that way of organizing multiple hosts, and I don't find it a
> flexible enough approach.  Having introduced it makes it difficult to later change.

I't forces us to support some "good enough" an approch for multiple
hosts config:
/etc/awststs/awstats.somehost1.conf
/etc/awststs/awstats.somehost2.conf
[...]
/etc/awststs/awstats.conf <- an exception in naming, some
common settings (should be included on top of /etc/awststs/awstats.*.conf).

Why this scheme is not "a flexible enough approach"?

Of course, our users are free to change crontab stuff, e.g. to
set up different cronjobs for different virtual hosts.



More information about the Pkg-awstats-devel mailing list