]> git.openstreetmap.org Git - chef.git/commitdiff
Only run awstats for planet on Sunday
authorTom Hughes <tom@compton.nu>
Fri, 5 Jul 2013 08:21:03 +0000 (09:21 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 5 Jul 2013 08:21:03 +0000 (09:21 +0100)
cookbooks/stats/templates/default/awstats.cron.erb
roles/stats.rb

index 8192870741ce3ade813b9e4f193ed0a847f93163..5d081e61994ff64ca8767ba64ccfc7b9c4fbd803 100644 (file)
@@ -1,5 +1,5 @@
 # DO NOT EDIT - This file is being maintained by Chef
 
 <% @sites.each_with_index do |site,index| -%>
 # 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 -%>
 <% end -%>
index 214c8b0b8790a884419d12f5018ef9058863f4b6..ae2e02b01c81e25c8db5895242a83ca00c1aa048 100644 (file)
@@ -6,11 +6,13 @@ default_attributes(
     :sites => [
       { 
         :name => "planet.openstreetmap.org",
     :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",
       },
       { 
         :name => "www.openstreetmap.org",
-        :log_pattern => "*-%YYYY-48-%MM-48-%DD-48.gz"
+        :log_pattern => "*-%YYYY-48-%MM-48-%DD-48.gz",
+        :days => "*"
       }
     ]
   }
       }
     ]
   }