]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/piwik/recipes/default.rb
Replace cron.d templates with cron_d resources
[chef.git] / cookbooks / piwik / recipes / default.rb
index 3b7a40057caa1f2bfe4abb56059005388abf45ca..948c03af41b00fa964131bc8af9afcde536a926e 100644 (file)
@@ -20,7 +20,7 @@
 include_recipe "apache"
 include_recipe "geoipupdate"
 include_recipe "mysql"
-include_recipe "php::apache-fpm"
+include_recipe "php::apache"
 
 passwords = data_bag_item("piwik", "passwords")
 
@@ -123,9 +123,8 @@ apache_site "piwik.openstreetmap.org" do
   template "apache.erb"
 end
 
-template "/etc/cron.d/piwiki" do
-  source "cron.erb"
-  owner "root"
-  group "root"
-  mode "0644"
+cron_d "piwik" do
+  minute "5"
+  user "www-data"
+  command "/usr/bin/php /srv/piwik.openstreetmap.org/console core:archive --quiet --url=https://piwik.openstreetmap.org/"
 end