function logfilesresolvedgz() { ls $1/$2/????.??.00.gz; }
function logfilesresolved() { ls $1/$2/????.??.00; }
function logfilesgz() { ls $1/$2/????.??.??.gz | grep -v '\.00\.gz$'; }
function logfiles() { ls $1/$2/????.??.?? | grep -v '\.00$'; }
function logcontentresolved() { for file in `logfilesresolvedgz $1 $2`; do zcat $file; done; for file in `logfilesresolved $1 $2`; do cat $file; done; }
function logcontent() { for file in `logfilesgz $1 $2`; do zcat $file; done; for file in `logfiles $1 $2`; do cat $file; done; }
function host() { cat $1/VIRTUAL/$2/hostname || exit1 "Unable to get hostname for virtual host."; }
function domain() { cat $1/VIRTUAL/$2/domainname || exit1 "Unable to get domainname for virtual host."; }
function analog_cfg() { echo /etc/analog_$2.conf; }
function webalizer_cfg() { echo /etc/webalizer_$2.conf; }
# The above can be overridden in /etc/local/www
. /etc/local/www || exit1 "Unable to read prefs file"
# variables and functions too boring to be configurable