X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/5386ec8ef8e99a1ad11f9dca45f8df25381d7a18..7f5c025954a0868b7ac2aea8722089e75c39668e:/cookbooks/tilecache/templates/default/logrotate.squid.erb 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