include_recipe "mysql"
package %w[
+ php-xml
+ php-curl
rsync
unzip
wkhtmltopdf
directory "/opt/civicrm-#{civicrm_version}" do
owner "wordpress"
group "wordpress"
- mode 0o755
+ mode "755"
end
remote_file "#{cache_dir}/civicrm-#{civicrm_version}-wordpress.zip" do
source "https://download.civicrm.org/civicrm-#{civicrm_version}-wordpress.zip"
owner "wordpress"
group "wordpress"
- mode 0o644
+ mode "644"
backup false
end
source "https://download.civicrm.org/civicrm-#{civicrm_version}-l10n.tar.gz"
owner "wordpress"
group "wordpress"
- mode 0o644
+ mode "644"
backup false
end
subscribes :run, "execute[#{cache_dir}/civicrm-#{civicrm_version}-l10n.tar.gz]", :immediately
end
-directory "/srv/join.osmfoundation.org/wp-content/plugins/files" do
+directory "/srv/join.osmfoundation.org/wp-content/uploads" do
owner "www-data"
group "www-data"
- mode 0o755
+ mode "755"
end
extensions_directory = "/srv/join.osmfoundation.org/wp-content/plugins/civicrm-extensions"
directory extensions_directory do
owner "wordpress"
group "wordpress"
- mode 0o755
+ mode "755"
end
node[:civicrm][:extensions].each_value do |details|
action :sync
repository details[:repository]
revision details[:revision]
- depth 1
user "wordpress"
group "wordpress"
end
line.gsub!(/%%dbHost%%/, "localhost")
line.gsub!(/%%dbName%%/, "civicrm")
line.gsub!(/%%crmRoot%%/, "#{civicrm_directory}/civicrm/")
- line.gsub!(/%%templateCompileDir%%/, "/srv/join.osmfoundation.org/wp-content/plugins/files/civicrm/templates_c/")
+ line.gsub!(/%%templateCompileDir%%/, "/srv/join.osmfoundation.org/wp-content/uploads/civicrm/templates_c/")
line.gsub!(/%%baseURL%%/, "http://join.osmfoundation.org/")
line.gsub!(/%%siteKey%%/, site_key)
- line.gsub!(%r{// *(.*'ext_repo_url'.*)$}, "\\1")
line.gsub!(%r{// *define\('CIVICRM_CMSDIR', '/path/to/install/root/'\);}, "define('CIVICRM_CMSDIR', '/srv/join.osmfoundation.org');")
line
file "#{civicrm_directory}/civicrm.settings.php" do
owner "wordpress"
group "wordpress"
- mode 0o644
+ mode "644"
content settings
end
source "backup.cron.erb"
owner "root"
group "root"
- mode 0o750
+ mode "750"
variables :passwords => passwords
end