6 DATE=$(date -u -d "1 day ago" "+%Y-%m-%d")
9 OUTDIR="<%= @output_dir %>"
10 TMPDIR=$(mktemp -d -t tilelog.XXXXXXXXX)
14 export AWS_ACCESS_KEY_ID="AKIASQUXHPE7JFCFMOUP"
15 export AWS_SECRET_ACCESS_KEY="<%= @aws_key %>"
16 export AWS_REGION="eu-west-1"
18 TILEFILE="tiles-${DATE}.txt.xz"
19 HOSTFILE="hosts-${DATE}.csv"
20 APPFILE="apps-${DATE}.csv"
21 COUNTRYFILE="countries-${DATE}.csv"
23 nice -n 19 /opt/tilelog/bin/tilelog --date "${DATE}" --generate-success \
24 --tile "${TILEFILE}" --host "${HOSTFILE}" --app "${APPFILE}" --country "${COUNTRYFILE}"
26 mv "${TILEFILE}" "${HOSTFILE}" "${APPFILE}" "${COUNTRYFILE}" "${OUTDIR}"