From c50a876827e93cb22a36879a03fa0f0c0270fcb8 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 16 Dec 2014 15:23:51 +0000 Subject: [PATCH] Manage squid as an upstart server on 14.04 --- cookbooks/squid/recipes/default.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]" -- 2.39.5