civicrm_version = node[:civicrm][:version]
civicrm_directory = "/srv/join.osmfoundation.org/wp-content/plugins/civicrm"
directory "/opt/civicrm-#{civicrm_version}" do
owner "wordpress"
group "wordpress"
civicrm_version = node[:civicrm][:version]
civicrm_directory = "/srv/join.osmfoundation.org/wp-content/plugins/civicrm"
directory "/opt/civicrm-#{civicrm_version}" do
owner "wordpress"
group "wordpress"
line.gsub!(/%%dbHost%%/, "localhost")
line.gsub!(/%%dbName%%/, "civicrm")
line.gsub!(/%%crmRoot%%/, "#{civicrm_directory}/civicrm/")
line.gsub!(/%%dbHost%%/, "localhost")
line.gsub!(/%%dbName%%/, "civicrm")
line.gsub!(/%%crmRoot%%/, "#{civicrm_directory}/civicrm/")
line.gsub!(/%%baseURL%%/, "http://join.osmfoundation.org/")
line.gsub!(/%%siteKey%%/, site_key)
line.gsub!(/%%baseURL%%/, "http://join.osmfoundation.org/")
line.gsub!(/%%siteKey%%/, site_key)
line.gsub!(%r{// *define\('CIVICRM_CMSDIR', '/path/to/install/root/'\);}, "define('CIVICRM_CMSDIR', '/srv/join.osmfoundation.org');")
line
line.gsub!(%r{// *define\('CIVICRM_CMSDIR', '/path/to/install/root/'\);}, "define('CIVICRM_CMSDIR', '/srv/join.osmfoundation.org');")
line
-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"