[Pkg-sks-commit] r121 - sks/trunk/sks/debian

chrism at alioth.debian.org chrism at alioth.debian.org
Thu Jun 19 15:02:26 UTC 2008


Author: chrism
Date: 2008-06-19 15:02:25 +0000 (Thu, 19 Jun 2008)
New Revision: 121

Modified:
   sks/trunk/sks/debian/TODO
   sks/trunk/sks/debian/sks.cron.daily
Log:
[project @ 122]
Remove old recon files and failed messages

Original author: weasel
Date: 2004-03-06 21:37:45.594392+00:00

Modified: sks/trunk/sks/debian/TODO
===================================================================
--- sks/trunk/sks/debian/TODO	2008-06-19 15:02:09 UTC (rev 120)
+++ sks/trunk/sks/debian/TODO	2008-06-19 15:02:25 UTC (rev 121)
@@ -14,11 +14,11 @@
 	o completing Build-Depends:
 	o wait for the non-free Nat stuff to get rewritten in ocaml.
 	  Sven says it will be in ocaml 3.08.
-	- who cleans failed_messages?
+	o who cleans failed_messages?
 	  if we go for the procmail solution (read below) messages will be
 	  injected immediatly. The failes_messages imho should just be logged
 	  (/var/log/sks/) and rotated since they become useless.
-	- clean up old diff-1.2.3.4.txt files:
+	o clean up old diff-1.2.3.4.txt files:
 	  ....  33 Dec 19 22:15 /var/spool/sks/diff-64.175.14.58.txt
 	- put useful conffiles into /etc/sks
 	o rename logs to foo.log and setup logrotate

Modified: sks/trunk/sks/debian/sks.cron.daily
===================================================================
--- sks/trunk/sks/debian/sks.cron.daily	2008-06-19 15:02:09 UTC (rev 120)
+++ sks/trunk/sks/debian/sks.cron.daily	2008-06-19 15:02:25 UTC (rev 121)
@@ -6,6 +6,16 @@
 
 [ -r /etc/sks/cron.conf ] && . /etc/sks/cron.conf
 
+# First, remove old diff-1.2.3.4.txt files
+# those files hold differences discovered during recon
+# eventhing that hasn't been touched in the last 2 weeks
+# is probably old and the result of a host that changed IP.
+
+find /var/spool/sks -type f -name 'diff-*.txt' -mtime +14 | xargs --no-run-if-empty rm -f
+
+# Also remove failed messages
+find /var/spool/sks/failed_messages -type f -name 'msg-*.ready' -mtime +14 | xargs --no-run-if-empty rm -f
+
 [ "$REMOVE_DB_LOGS" = "no" ] && exit 0
 
 clean_directory() {




More information about the Pkg-sks-commit mailing list