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