[Pkg-sks-commit] r65 - sks/trunk/sks/debian
chrism at alioth.debian.org
chrism at alioth.debian.org
Thu Jun 19 14:47:07 UTC 2008
Author: chrism
Date: 2008-06-19 14:47:06 +0000 (Thu, 19 Jun 2008)
New Revision: 65
Added:
sks/trunk/sks/debian/sks.cron.daily
Modified:
sks/trunk/sks/debian/rules
Log:
[project @ 66]
Add a cronjob
Original author: weasel
Date: 2003-12-06 22:32:43.493508+00:00
Modified: sks/trunk/sks/debian/rules
===================================================================
--- sks/trunk/sks/debian/rules 2008-06-19 14:46:38 UTC (rev 64)
+++ sks/trunk/sks/debian/rules 2008-06-19 14:47:06 UTC (rev 65)
@@ -49,6 +49,7 @@
dh_shlibdeps
dh_installdebconf
dh_installinit -- defaults 92
+ dh_installcron
dh_installdeb
dh_gencontrol
dh_md5sums
Added: sks/trunk/sks/debian/sks.cron.daily
===================================================================
--- sks/trunk/sks/debian/sks.cron.daily (rev 0)
+++ sks/trunk/sks/debian/sks.cron.daily 2008-06-19 14:47:06 UTC (rev 65)
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# daily cron to cleanup DB's log files.
+
+set -e
+
+[ -r /etc/sks/cron.conf ] && . /etc/sks/cron.conf
+
+[ "$REMOVE_DB_LOGS" = "no" ] && exit 0
+
+clean_directory() {
+ dir=$1
+ if [ -d "$dir" ]
+ then
+ cd $dir
+ db4.1_archive | xargs --no-run-if-empty rm -f
+ cd -
+ fi
+ return 0
+}
+
+# This directory used if the dump is imported completely using »sks build«.
+# The dump directory is unused in that key.
+clean_directory /var/lib/sks/DB
+
+# If »sks fastbuild« was used then sks only creates indexes etc in the KDB
+# directory. It also adds new keys to the dir, but never touches the dump
+# dir.
+clean_directory /var/lib/sks/KDB
+
+# PTree is for the hashes used with the reconciliation algorithm. (I think)
+clean_directory /var/lib/sks/PTree
+
+
+exit 0
Property changes on: sks/trunk/sks/debian/sks.cron.daily
___________________________________________________________________
Name: svn:executable
+ *
More information about the Pkg-sks-commit
mailing list