From 92237a3d062dba6f9aa36bdb40e439f64dcb55a1 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Fri, 5 Jun 2015 14:03:17 +0200 Subject: scriptherder --- global/overlay/etc/cron.d/cosmos | 2 +- global/overlay/etc/cron.daily/scriptherder_cleanup | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 global/overlay/etc/cron.daily/scriptherder_cleanup (limited to 'global/overlay/etc') diff --git a/global/overlay/etc/cron.d/cosmos b/global/overlay/etc/cron.d/cosmos index 4eab8de..2aadd2e 100644 --- a/global/overlay/etc/cron.d/cosmos +++ b/global/overlay/etc/cron.d/cosmos @@ -1,4 +1,4 @@ SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -*/15 * * * * root test -f /etc/no-automatic-cosmos || /usr/local/bin/run-cosmos +*/15 * * * * root test -f /etc/no-automatic-cosmos || scriptherder --mode wrap --syslog --name cosmos -- /usr/local/bin/run-cosmos 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 -- cgit v1.1