From: Tom Hughes Date: Tue, 16 Dec 2014 15:23:51 +0000 (+0000) Subject: Manage squid as an upstart server on 14.04 X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/c50a876827e93cb22a36879a03fa0f0c0270fcb8 Manage squid as an upstart server on 14.04 --- diff --git a/cookbooks/squid/recipes/default.rb b/cookbooks/squid/recipes/default.rb index ce8ec8c9e..3fb9fcf89 100644 --- a/cookbooks/squid/recipes/default.rb +++ b/cookbooks/squid/recipes/default.rb @@ -41,7 +41,10 @@ directory "/etc/squid/squid.conf.d" do end service "squid" do - action [ :enable, :start ] + if node[:lsb][:release].to_f >= 14.04 + provider Chef::Provider::Service::Upstart + end + action [ :enable, :start ] supports :status => true, :restart => true, :reload => true subscribes :reload, "template[/etc/squid/squid.conf]" subscribes :restart, "template[/etc/default/squid]"