summaryrefslogtreecommitdiff
path: root/global/overlay/etc/cron.daily/scriptherder_cleanup
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2015-06-05 14:03:17 +0200
committerLeif Johansson <leifj@sunet.se>2015-06-05 14:03:17 +0200
commit92237a3d062dba6f9aa36bdb40e439f64dcb55a1 (patch)
tree5d3120c3c305c58f2354be4b03b094cace076bca /global/overlay/etc/cron.daily/scriptherder_cleanup
parent2e3cc075bfcde3cab20be3e54016cf217f13323b (diff)
Diffstat (limited to 'global/overlay/etc/cron.daily/scriptherder_cleanup')
-rwxr-xr-xglobal/overlay/etc/cron.daily/scriptherder_cleanup10
1 files changed, 10 insertions, 0 deletions
diff --git a/global/overlay/etc/cron.daily/scriptherder_cleanup b/global/overlay/etc/cron.daily/scriptherder_cleanup
new file mode 100755
index 0000000..08ec7f5
--- /dev/null
+++ b/global/overlay/etc/cron.daily/scriptherder_cleanup
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Remove scriptherder data older than 7 days.
+#
+
+DIR="/var/cache/scriptherder/"
+
+test -d ${DIR} || exit 0
+
+find ${DIR} -type f -mtime +7 -print0 | xargs -0 rm -f