summaryrefslogtreecommitdiff
path: root/localwebstats
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2002-09-12 17:34:37 +0000
committerJonas Smedegaard <dr@jones.dk>2002-09-12 17:34:37 +0000
commit64efc7b9a426a1b7fd7b155d95855357649c44cb (patch)
treec035432ecd27fa61f6fd6dd79a27de8e86d6b134 /localwebstats
parent4b773d4d101175d3eed16898deb3f839a5f21f3e (diff)
localwebstats: Add documentary header.
Diffstat (limited to 'localwebstats')
-rwxr-xr-xlocalwebstats30
1 files changed, 28 insertions, 2 deletions
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 <dr@jones.dk>
#
-# $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/<uid>/websites/<fqdn>
+# # * 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/<fqdn>
+# # * /etc/apache/vhosts.d/<fqdn> has hints about host- and domain-part of fqdn:
+# # # webstats: hostname: <hostname>
+# # # webstats: domainname: <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() {