OLD | NEW |
1 dir = dirtemplate % '<%= title %>' | 1 build_pages('<%= title %>', dirtemplate % '<%= title %>', 'month') |
2 if not os.path.exists(dir): | 2 if day: |
3 os.mkdir(dir, 0755) | 3 dir = os.path.join('/var/www/awstats/daily', '<%= title %>', day) |
4 | 4 build_pages('<%= title %>', dir, 'day') |
5 subprocess.check_output([ | |
6 '/usr/share/awstats/tools/awstats_buildstaticpages.pl', | |
7 '-configdir=/var/www/awstatsconf', | |
8 '-config=<%= title %>', | |
9 '-dir=%s' % dir | |
10 ] + additional_params) | |
11 | |
12 index = os.path.join(dir, 'index.html') | |
13 if not os.path.exists(index): | |
14 os.symlink(os.path.join(dir, 'awstats.<%= title %>.html'), index) | |
OLD | NEW |