From: Tom Hughes Date: Fri, 10 Jul 2020 21:46:58 +0000 (+0100) Subject: Fix logrotate for squid 4.11 X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/c93725e785e610bd75e20004e50552271799b711?ds=inline Fix logrotate for squid 4.11 --- 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