Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 | |
3 import subprocess | |
4 | |
5 def process_logs(site, databasebreak): | |
6 datadir = { | |
7 'month': '/var/www/awstatsdata', | |
8 'day': '/var/www/awstatsdatadaily', | |
9 }[databasebreak] | |
10 | |
11 subprocess.check_output([ | |
12 '/usr/lib/cgi-bin/awstats.pl', | |
13 '-configdir=/var/www/awstatsconf', | |
14 '-config=%s' % site, | |
15 '-databasebreak=%s' % databasebreak, | |
16 '-update' | |
17 ], env={'AWSTATSDATA': datadir}) | |
OLD | NEW |