X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/94db71c4cc23c8d77a0a3e8bbf13e5250485738b..a76a59954c016d17e803d319d01168e986b8e74a:/cookbooks/piwik/recipes/default.rb diff --git a/cookbooks/piwik/recipes/default.rb b/cookbooks/piwik/recipes/default.rb index 9064522bf..c8b9b101b 100644 --- a/cookbooks/piwik/recipes/default.rb +++ b/cookbooks/piwik/recipes/default.rb @@ -33,7 +33,9 @@ package "php-apcu" package "geoipupdate" +apache_module "expires" apache_module "php7.2" +apache_module "rewrite" version = node[:piwik][:version] @@ -56,6 +58,14 @@ execute "unzip-piwik-#{version}" do not_if { File.exist?("/opt/piwik-#{version}/piwik") } end +execute "/opt/piwik-#{version}/piwik/piwik.js" do + command "gzip -k -9 /opt/piwik-#{version}/piwik/piwik.js" + cwd "/opt/piwik-#{version}" + user "root" + group "root" + not_if { File.exist?("/opt/piwik-#{version}/piwik/piwik.js.gz") } +end + directory "/opt/piwik-#{version}/piwik/config" do owner "www-data" group "www-data"