-ruby_block "#{civicrm_directory}/civicrm.settings.php" do
- block do
- out = File.new("#{civicrm_directory}/civicrm.settings.php", "w")
-
- File.foreach("#{civicrm_directory}/templates/CRM/common/civicrm.settings.php.tpl") do |line|
- line.gsub!(/%%cms%%/, "Drupal")
- line.gsub!(/%%CMSdbUser%%/, "civicrm")
- line.gsub!(/%%CMSdbPass%%/, database_password)
- line.gsub!(/%%CMSdbHost%%/, "localhost")
- line.gsub!(/%%CMSdbName%%/, "civicrm")
- line.gsub!(/%%dbUser%%/, "civicrm")
- line.gsub!(/%%dbPass%%/, database_password)
- line.gsub!(/%%dbHost%%/, "localhost")
- line.gsub!(/%%dbName%%/, "civicrm")
- line.gsub!(/%%crmRoot%%/, "/usr/share/drupal7/sites/all/modules/civicrm")
- line.gsub!(/%%templateCompileDir%%/, "/data/crm.osmfoundation.org/civicrm")
- line.gsub!(/%%baseURL%%/, "http://crm.osmfoundation.org/")
- line.gsub!(/%%siteKey%%/, site_key)
-
- out.print(line)
- end
-
- out.close
- end
-
- not_if do
- File.exist?("#{civicrm_directory}/civicrm.settings.php") and
- File.mtime("#{civicrm_directory}/civicrm.settings.php") >= File.mtime("#{civicrm_directory}/templates/CRM/common/civicrm.settings.php.tpl")
- end
+remote_file "/var/cache/chef/civicrm-#{civicrm_version}-l10n.tar.gz" do
+ action :create_if_missing
+ source "http://downloads.sourceforge.net/project/civicrm/civicrm-stable/#{civicrm_version}/civicrm-#{civicrm_version}-l10n.tar.gz"
+ owner "wordpress"
+ group "wordpress"
+ mode 0644
+ backup false