action :delete
end
+squid_service_exec = if node[:lsb][:release].to_f < 20.04
+ "/usr/sbin/squid -YC"
+ else
+ "/usr/sbin/squid --foreground -sYC"
+ end
+
systemd_service "squid" do
dropin "chef"
limit_nofile 98304
protect_home true
restrict_address_families address_families
restart "always"
- exec_start "/usr/sbin/squid --foreground -YC"
+ exec_start "#{squid_service_exec}"
end
# Quick hack to cleanup bloated journal
cpu_affinity_map process_numbers=<%= (1..[ node[:cpu][:total] - 2, 1 ].max.ceil).to_a.join(',') %> cores=<%=(1..[ node[:cpu][:total] - 2, 1 ].max.ceil).to_a.join(',') %>
# Set short clean shutdown interval
-shutdown_lifetime 10 seconds
+shutdown_lifetime 2 seconds
error_log_languages off
<% end -%>