X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/aeaa46f3071de018b5c5e0f5678cb5b4082e3ddc..71782b10c75d33947d536a9c8adccb039601155d:/cookbooks/spamassassin/recipes/default.rb diff --git a/cookbooks/spamassassin/recipes/default.rb b/cookbooks/spamassassin/recipes/default.rb index d9af52bd1..db498b75f 100644 --- a/cookbooks/spamassassin/recipes/default.rb +++ b/cookbooks/spamassassin/recipes/default.rb @@ -19,7 +19,13 @@ package "spamassassin" -service "spamassassin" do +service_name = if platform?("debian") + "spamd" + else + "spamassassin" + end + +service service_name do action [:enable, :start] supports :status => true, :restart => true, :reload => true end @@ -35,7 +41,7 @@ template "/etc/default/spamassassin" do owner "root" group "root" mode "644" - notifies :restart, "service[spamassassin]" + notifies :restart, "service[#{service_name}]" end trusted_networks = node[:exim][:relay_from_hosts] @@ -54,5 +60,5 @@ template "/etc/spamassassin/local.cf" do group "root" mode "644" variables :trusted_networks => trusted_networks.sort - notifies :restart, "service[spamassassin]" + notifies :restart, "service[#{service_name}]" end