From 321da3bf245b9b383da5aa97f8c7218e2e538cb0 Mon Sep 17 00:00:00 2001 From: Matt Amos Date: Tue, 16 Feb 2016 13:30:09 +0000 Subject: [PATCH] Take yesterday's squid logs for analysis rather than two days ago. --- cookbooks/tilecache/templates/default/logrotate.squid.erb | 2 +- cookbooks/tilelog/templates/default/tilelog.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/tilecache/templates/default/logrotate.squid.erb b/cookbooks/tilecache/templates/default/logrotate.squid.erb index 6ce392c1d..e6bfbc688 100644 --- a/cookbooks/tilecache/templates/default/logrotate.squid.erb +++ b/cookbooks/tilecache/templates/default/logrotate.squid.erb @@ -12,6 +12,6 @@ sharedscripts postrotate test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate - /usr/bin/rsync /var/log/squid/zere.log.2.xz ironbelly::logs/tile.openstreetmap.org/<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.xz || true + /usr/bin/rsync /var/log/squid/zere.log.1.xz ironbelly::logs/tile.openstreetmap.org/<%= node[:hostname] %>-`date -d "-1 days" +%Y-%m-%d`.xz || true endscript } diff --git a/cookbooks/tilelog/templates/default/tilelog.erb b/cookbooks/tilelog/templates/default/tilelog.erb index 1d9c8b468..598c1e127 100644 --- a/cookbooks/tilelog/templates/default/tilelog.erb +++ b/cookbooks/tilelog/templates/default/tilelog.erb @@ -4,7 +4,7 @@ ANALYZE=<%= @analyze_bin %> LOGDIR=<%= @input_dir %> OUTDIR=<%= @output_dir %> if [ -z "$DATE" ]; then - DATE=`date -d "2 days ago" "+%Y-%m-%d"` + DATE=`date -d "1 day ago" "+%Y-%m-%d"` fi TMPDIR=`mktemp -d -t tmp.XXXXXXXXX` ORIGDIR=`pwd` -- 2.39.5