]> git.openstreetmap.org Git - chef.git/commitdiff
Manage squid as an upstart server on 14.04
authorTom Hughes <tom@compton.nu>
Tue, 16 Dec 2014 15:23:51 +0000 (15:23 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 16 Dec 2014 15:23:51 +0000 (15:23 +0000)
cookbooks/squid/recipes/default.rb

index ce8ec8c9e245d041a4ef8d906fc35c3f0d126c26..3fb9fcf89c05ebd00e4cb94b5c26c48dee3650c2 100644 (file)
@@ -41,7 +41,10 @@ directory "/etc/squid/squid.conf.d" do
 end
 
 service "squid" 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]"
   supports :status => true, :restart => true, :reload => true
   subscribes :reload, "template[/etc/squid/squid.conf]"
   subscribes :restart, "template[/etc/default/squid]"