First pass at real awstats config
authorAlex Dehnert <adehnert@mit.edu>
Tue, 2 Mar 2010 17:45:11 +0000 (12:45 -0500)
committerroot <root@olinda.mit.edu>
Tue, 2 Mar 2010 17:45:11 +0000 (12:45 -0500)
awstats.conf.local
awstats.olinda.conf [new file with mode: 0644]
cron-script.sh [new file with mode: 0755]

index dbe40656e4402552f5246e74db122a32e4116cb3..19e8929489d813a8a8e1313479a1d4de05aee433 100644 (file)
@@ -2,3 +2,4 @@
 # This is particularly useful for users with several configs for
 # different virtual servers, who want to reuse common parameters.
 # Also, this file is not updated with each new upstream release.
+LogFormat=1 # Combined
diff --git a/awstats.olinda.conf b/awstats.olinda.conf
new file mode 100644 (file)
index 0000000..8213306
--- /dev/null
@@ -0,0 +1,6 @@
+# AWSTATS CONFIGURE FILE 6.8
+
+Include "awstats.conf"
+
+SiteDomain="olinda.mit.edu"
+HostAliases="localhost 127.0.0.1 olinda.mit.edu www.dehnerts.com www.dehnert.arctic.org olinda.dehnerts.com olinda.dehnert.arctic.org"
diff --git a/cron-script.sh b/cron-script.sh
new file mode 100755 (executable)
index 0000000..b0da2e3
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -e
+
+domains="olinda"
+
+if [ ! -x /usr/lib/cgi-bin/awstats.pl ]; then exit 1; fi
+
+for domain in $domains; do
+    echo "Updating $domain..."
+    /usr/lib/cgi-bin/awstats.pl -config=$domain -update
+    echo "Building pages..."
+    /var/lib/awstats/bin/awstats_buildstaticpages.pl -awstatsprog=/usr/lib/cgi-bin/awstats.pl -config=$domain -dir=output
+done
+echo "Done with awstats."