]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tilecache/templates/default/logrotate.squid.erb
Stop handling X-Forwarded-For from old tile CDN
[chef.git] / cookbooks / tilecache / templates / default / logrotate.squid.erb
index 697f0c5c6057a3040a62fda7dce23fff24e24926..40a2240b419c66c6bb5984a24373fb7ed689bb88 100644 (file)
   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