| 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) |