]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/squid/recipes/default.rb
Silence update-smart-drivedb updates
[chef.git] / cookbooks / squid / recipes / default.rb
index b526aa19026e9b91270d920b4e8dc84987b5e456..b46cafe3a84d430ef9d3bdbba2e347c98f458707 100644 (file)
@@ -98,6 +98,12 @@ file "/etc/logrotate.d/squid.dpkg-dist" do
   action :delete
 end
 
+squid_service_exec = if node[:lsb][:release].to_f < 20.04
+                       "/usr/sbin/squid -YC"
+                     else
+                       "/usr/sbin/squid --foreground -YC"
+                     end
+
 systemd_service "squid" do
   dropin "chef"
   limit_nofile 98304
@@ -107,7 +113,7 @@ systemd_service "squid" do
   protect_home true
   restrict_address_families address_families
   restart "always"
-  ExecStart "/usr/sbin/squid --foreground -YC"
+  exec_start "#{squid_service_exec}"
 end
 
 service "squid" do