Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/statsmaster/templates/build_static_item.erb

Issue 6293281981857792: Issue 239 - Move AWStats processing to the stats server (Closed)
Patch Set: Created April 23, 2014, 1:14 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/statsmaster/templates/build_static_item.erb
===================================================================
new file mode 100644
--- /dev/null
+++ b/modules/statsmaster/templates/build_static_item.erb
@@ -0,0 +1,14 @@
+dir = dirtemplate % '<%= title %>'
+if not os.path.exists(dir):
+ os.mkdir(dir, 0755)
+
+subprocess.check_output([
+ '/usr/share/awstats/tools/awstats_buildstaticpages.pl',
+ '-configdir=/var/www/awstatsconf',
+ '-config=<%= title %>',
+ '-dir=%s' % dir
+] + additional_params)
+
+index = os.path.join(dir, 'index.html')
+if not os.path.exists(index):
+ os.symlink(os.path.join(dir, 'awstats.<%= title %>.html'), index)

Powered by Google App Engine
This is Rietveld