summaryrefslogtreecommitdiffstats
path: root/etc/cron.daily/visitors
blob: 47c8b6ddf866eb57f2d4c0db4ce4a35d9a18188c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# Copyright 2012 Holger Levsen <holger@layer-acht.org>
# released under the GPLv=2

LOGS=$(mktemp)
DOT=$(mktemp)
# FIXME: provide monthly stats and don't run this daily
zcat /var/log/apache2/access.log* | grep -v 127.0.0.1 | sort | ip2host > $LOGS

visitors --debug -AKMY -m 30 $LOGS > /var/www/visitors-report.html 1> /dev/null
#visitors --debug -VT -m 30 --prefix http://jenkins.debian.net $LOGS > $DOT
# dot -Tpng -o/var/lib/www/visitors-report-graph.png $DOT

rm $LOGS $DOT