]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tilecache/templates/default/tilecache-curl-time-cleanup.erb
tilecache: compress old curl time records
[chef.git] / cookbooks / tilecache / templates / default / tilecache-curl-time-cleanup.erb
diff --git a/cookbooks/tilecache/templates/default/tilecache-curl-time-cleanup.erb b/cookbooks/tilecache/templates/default/tilecache-curl-time-cleanup.erb
new file mode 100644 (file)
index 0000000..3be4267
--- /dev/null
@@ -0,0 +1,3 @@
+#/bin/bash
+set -eu
+/usr/bin/find /srv/tilecache/data/ -type f -iname '*.txt' -mtime +7 -print0 | /usr/bin/xargs -0 -n 12 --no-run-if-empty -P 2 /usr/bin/xz -9e