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
protect_home true
restrict_address_families address_families
restart "always"
- exec_start "/usr/sbin/squid --foreground -YC"
-end
-
-# Quick hack to cleanup bloated journal
-execute "tmp_journal_clean_up" do
- command "/bin/journalctl --vacuum-time=1d"
+ exec_start "#{squid_service_exec}"
end
service "squid" do