Index: modules/statsmaster/templates/process_logs_head.erb |
=================================================================== |
--- a/modules/statsmaster/templates/process_logs_head.erb |
+++ b/modules/statsmaster/templates/process_logs_head.erb |
@@ -1,3 +1,17 @@ |
#!/usr/bin/env python |
import subprocess |
+ |
+def process_logs(site, databasebreak): |
+ datadir = { |
+ 'month': '/var/www/awstatsdata', |
+ 'day': '/var/www/awstatsdatadaily', |
+ }[databasebreak] |
+ |
+ subprocess.check_output([ |
+ '/usr/lib/cgi-bin/awstats.pl', |
+ '-configdir=/var/www/awstatsconf', |
+ '-config=%s' % site, |
+ '-databasebreak=%s' % databasebreak, |
+ '-update' |
+ ], env={'AWSTATSDATA': datadir}) |