From 64efc7b9a426a1b7fd7b155d95855357649c44cb Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 12 Sep 2002 17:34:37 +0000 Subject: localwebstats: Add documentary header. --- localwebstats | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'localwebstats') diff --git a/localwebstats b/localwebstats index bec7cfa..22bc975 100755 --- a/localwebstats +++ b/localwebstats @@ -3,12 +3,38 @@ # /usr/local/sbin/localwebstats # Copyright 2001-2002 Jonas Smedegaard # -# $Id: localwebstats,v 1.20 2002-09-11 20:33:10 jonas Exp $ +# $Id: localwebstats,v 1.21 2002-09-12 17:34:37 jonas Exp $ # # Webstats maintenance script # +# Example config file (/etc/local/webstats.conf). +# +# --- CUT --- CUT --- CUT --- +# #!/bin/sh +# +# # * Websites are in /home//websites/ +# # * Apache httpd.conf has this line added: +# # Include /etc/apache/vhosts.d +# # * /usr/lib/apache/suexec is recompiled using /usr/local/bin/make-suexec-for-home +# # * Each webhost has apache config in /etc/apache/vhosts.d/ +# # * /etc/apache/vhosts.d/ has hints about host- and domain-part of fqdn: +# # # webstats: hostname: +# # # webstats: domainname: +# +# #WEBALIZER_OPTIONS="-Q" +# +# LOGROOT='/var/log/apache-vhosts' +# WEBROOT='/home' +# +# function statsdir() { echo /home/jonas/websites/stats.$(dnsdomainname)/$3; } +# function webdirs() { find /etc/apache/vhosts.d/ -type f -exec egrep '^#\W*webstats:' '{}' -l ';' | xargs basename; } +# function host() { cat /etc/apache/vhosts.d/$3 | egrep '#\W*webstats:\W*hostname:\W*[\.[:alnum:]]+\W*$' | sed 's/^.*:\W\([\.[:alnum:]]\+\)\W*$/\1/'; } +# function domain() { cat /etc/apache/vhosts.d/$3 | egrep '#\W*webstats:\W*domainname:\W*[\.[:alnum:]]+\W*$' | sed 's/^.*:\W\([\.[:alnum:]]\+\)\W*$/\1/'; } +# +# --- CUT --- CUT --- CUT --- +# -# halt on errors (NB! this is a bashism...) +# halt on errors set -e function usage() { -- cgit v1.2.3