X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/6818a060ad9d20217b10428e23f9d6fb9ec9e33a..b7ad0079c7b68733b52d84b5e9f32a68e0f0902b:/cookbooks/matomo/recipes/default.rb?ds=inline diff --git a/cookbooks/matomo/recipes/default.rb b/cookbooks/matomo/recipes/default.rb index b916e83d7..453afc488 100644 --- a/cookbooks/matomo/recipes/default.rb +++ b/cookbooks/matomo/recipes/default.rb @@ -43,23 +43,12 @@ version = node[:matomo][:version] geoip_directory = node[:geoipupdate][:directory] -directory "/opt/matomo-#{version}" do - owner "root" - group "root" - mode "0755" -end - remote_file "#{Chef::Config[:file_cache_path]}/matomo-#{version}.zip" do source "https://builds.matomo.org/matomo-#{version}.zip" end archive_file "#{Chef::Config[:file_cache_path]}/matomo-#{version}.zip" do - action :nothing destination "/opt/matomo-#{version}" - overwrite true - owner "root" - group "root" - subscribes :extract, "remote_file[#{Chef::Config[:file_cache_path]}/matomo-#{version}.zip]", :immediately notifies :run, "notify_group[matomo-updated]" end @@ -71,12 +60,8 @@ node[:matomo][:plugins].each do |plugin_name, plugin_version| end archive_file "#{Chef::Config[:file_cache_path]}/matomo-#{plugin_name}-#{plugin_version}.zip" do - action :nothing destination "/opt/matomo-#{version}/matomo/plugins" - overwrite true - owner "root" - group "root" - subscribes :extract, "remote_file[#{Chef::Config[:file_cache_path]}/matomo-#{plugin_name}-#{plugin_version}.zip]", :immediately + overwrite :auto notifies :run, "notify_group[matomo-updated]" end end @@ -157,7 +142,7 @@ if File.symlink?("/srv/matomo.openstreetmap.org") execute "/opt/matomo-#{version}/matomo/matomo.br" do action :nothing - command "brotli -k -9 /opt/matomo-#{version}/matomo/matomo.js" + command "brotli --keep --best /opt/matomo-#{version}/matomo/matomo.js" cwd "/opt/matomo-#{version}" user "root" group "root" @@ -166,7 +151,7 @@ if File.symlink?("/srv/matomo.openstreetmap.org") execute "/opt/matomo-#{version}/matomo/matomo.js" do action :nothing - command "gzip -k -9 /opt/matomo-#{version}/matomo/matomo.js" + command "gzip --keep --best /opt/matomo-#{version}/matomo/matomo.js" cwd "/opt/matomo-#{version}" user "root" group "root" @@ -175,7 +160,7 @@ if File.symlink?("/srv/matomo.openstreetmap.org") execute "/opt/matomo-#{version}/matomo/piwik.br" do action :nothing - command "brotli -k -9 /opt/matomo-#{version}/matomo/piwik.js" + command "brotli --keep --best /opt/matomo-#{version}/matomo/piwik.js" cwd "/opt/matomo-#{version}" user "root" group "root" @@ -184,7 +169,7 @@ if File.symlink?("/srv/matomo.openstreetmap.org") execute "/opt/matomo-#{version}/matomo/piwik.js" do action :nothing - command "gzip -k -9 /opt/matomo-#{version}/matomo/piwik.js" + command "gzip --keep --best /opt/matomo-#{version}/matomo/piwik.js" cwd "/opt/matomo-#{version}" user "root" group "root"