From c93725e785e610bd75e20004e50552271799b711 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 10 Jul 2020 22:46:58 +0100 Subject: [PATCH] Fix logrotate for squid 4.11 --- cookbooks/tilecache/templates/default/logrotate.squid.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cookbooks/tilecache/templates/default/logrotate.squid.erb b/cookbooks/tilecache/templates/default/logrotate.squid.erb index 697f0c5c6..40a2240b4 100644 --- a/cookbooks/tilecache/templates/default/logrotate.squid.erb +++ b/cookbooks/tilecache/templates/default/logrotate.squid.erb @@ -12,7 +12,11 @@ nocreate sharedscripts postrotate +<% if node[:lsb][:release].to_f < 20.04 -%> test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate +<% else -%> + test ! -e /run/squid/squid.pid || /usr/sbin/squid -k rotate +<% end -%> endscript lastaction /usr/bin/rsync --preallocate /var/log/squid/access.log.1.xz ironbelly::logs/tile.openstreetmap.org/<%= node[:hostname] %>-`date -d "-1 days" +%Y-%m-%d`.xz || true -- 2.39.5