]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/civicrm/recipes/default.rb
Replace cron.d templates with cron_d resources
[chef.git] / cookbooks / civicrm / recipes / default.rb
index 4486ea3520eb718c34c0aee434fc808182bcf32f..246f66332b6267313554b7f64068273fe1e5ccae 100644 (file)
 include_recipe "wordpress"
 include_recipe "mysql"
 
-package "wkhtmltopdf"
+package %w[
+  rsync
+  unzip
+  wkhtmltopdf
+]
 
 cache_dir = Chef::Config[:file_cache_path]
 
@@ -46,7 +50,7 @@ end
 
 wordpress_theme "osmblog-wp-theme" do
   site "join.osmfoundation.org"
-  repository "git://github.com/harry-wood/osmblog-wp-theme.git"
+  repository "https://github.com/harry-wood/osmblog-wp-theme.git"
 end
 
 wordpress_plugin "registration-honeypot" do
@@ -136,6 +140,7 @@ node[:civicrm][:extensions].each_value do |details|
     action :sync
     repository details[:repository]
     revision details[:revision]
+    depth 1
     user "wordpress"
     group "wordpress"
   end
@@ -168,12 +173,11 @@ file "#{civicrm_directory}/civicrm.settings.php" do
   content settings
 end
 
-template "/etc/cron.d/osmf-crm" do
-  source "cron.erb"
-  owner "root"
-  group "root"
-  mode 0o600
-  variables :directory => civicrm_directory, :passwords => passwords
+cron_d "osmf-crm" do
+  minute "*/15"
+  user "www-data"
+  command "php #{civicrm_directory}/civicrm/bin/cli.php -s join.osmfoundation.org -u batch -p \"#{passwords['batch']}\" -e Job -a execute 2>&1 | egrep -v '^PHP (Deprecated|Warning):'"
+  mailto "admins@openstreetmap.org"
 end
 
 template "/etc/cron.daily/osmf-crm-backup" do