]> git.openstreetmap.org Git - chef.git/commitdiff
Make handling of external matomo plugins more robust
authorTom Hughes <tom@compton.nu>
Wed, 10 Aug 2022 21:22:21 +0000 (22:22 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 10 Aug 2022 21:22:21 +0000 (22:22 +0100)
cookbooks/matomo/recipes/default.rb

index e892767d95b151d26af9c90b15cefd0c5e04a58f..2cbd469b6daf22fce16da80d72da9dd4c636b3ff 100644 (file)
@@ -60,8 +60,11 @@ node[:matomo][:plugins].each do |plugin_name, plugin_version|
   end
 
   archive_file "#{Chef::Config[:file_cache_path]}/matomo-#{plugin_name}-#{plugin_version}.zip" do
-    destination "/opt/matomo-#{version}/matomo/plugins"
-    overwrite :auto
+    destination "/opt/matomo-#{plugin_name}-#{plugin_version}"
+  end
+
+  link "/opt/matomo-#{version}/matomo/plugins/#{plugin_name}" do
+    to "/opt/matomo-#{plugin_name}-#{plugin_version}/#{plugin_name}"
     notifies :run, "notify_group[matomo-updated]"
   end
 end