From: Tom Hughes Date: Fri, 5 Jul 2013 08:21:03 +0000 (+0100) Subject: Only run awstats for planet on Sunday X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/55e94b06f8e0d01c6c91b584b9ffe37d809e066a Only run awstats for planet on Sunday --- diff --git a/cookbooks/stats/templates/default/awstats.cron.erb b/cookbooks/stats/templates/default/awstats.cron.erb index 819287074..5d081e619 100644 --- a/cookbooks/stats/templates/default/awstats.cron.erb +++ b/cookbooks/stats/templates/default/awstats.cron.erb @@ -1,5 +1,5 @@ # DO NOT EDIT - This file is being maintained by Chef <% @sites.each_with_index do |site,index| -%> -0 <%= "%02d" % [ 8 + index * 2 ] %> * * * www-data /usr/lib/cgi-bin/awstats.pl -config=<%= site[:name] %> -update > /dev/null +0 <%= "%02d" % [ 8 + index * 2 ] %> * * <%= site[:days] %> www-data /usr/lib/cgi-bin/awstats.pl -config=<%= site[:name] %> -update > /dev/null <% end -%> diff --git a/roles/stats.rb b/roles/stats.rb index 214c8b0b8..ae2e02b01 100644 --- a/roles/stats.rb +++ b/roles/stats.rb @@ -6,11 +6,13 @@ default_attributes( :sites => [ { :name => "planet.openstreetmap.org", - :log_pattern => "%YYYY-168-%MM-168-%DD-168.gz" + :log_pattern => "%YYYY-168-%MM-168-%DD-168.gz", + :days => "7" }, { :name => "www.openstreetmap.org", - :log_pattern => "*-%YYYY-48-%MM-48-%DD-48.gz" + :log_pattern => "*-%YYYY-48-%MM-48-%DD-48.gz", + :days => "*" } ] }