diff --git a/cookbooks/collectd/recipes/httpd.rb b/cookbooks/collectd/recipes/httpd.rb index 51fb973c..93ae317c 100644 --- a/cookbooks/collectd/recipes/httpd.rb +++ b/cookbooks/collectd/recipes/httpd.rb @@ -48,6 +48,15 @@ notifies :restart, "service[fcgiwrap]", :delayed end +cookbook_file "/etc/systemd/system/collectd-httpd.service" do + source 'collectd-httpd.service' + owner 'root' + group 'root' + mode 0644 + notifies :run, "execute[reload-systemd]", :immediately + notifies :restart, "service[collectd-httpd]", :immediately +end + service 'fcgiwrap.socket' do provider Chef::Provider::Service::Systemd action :enable @@ -55,17 +64,7 @@ service "collectd-httpd" do provider Chef::Provider::Service::Systemd - action :nothing -end - -cookbook_file "/etc/systemd/system/collectd-httpd.service" do - source 'collectd-httpd.service' - owner 'root' - group 'root' - mode 0644 - notifies :run, "execute[reload-systemd]", :immediately - notifies :enable, "service[collectd-httpd]", :immediately - notifies :start, "service[collectd-httpd]", :immediately + action [:start, :enable] end package "apache2-utils"