From 8209f212c50375b0d1191065cfff6e1c88c6db75 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 25 Mar 2005 14:27:33 +0000 Subject: Cleanup jdresolve db only after an hour of inactivity (to avoid cleanup delay at every month of every host). --- localwebresolve | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'localwebresolve') diff --git a/localwebresolve b/localwebresolve index 1f97244..5ad38a4 100755 --- a/localwebresolve +++ b/localwebresolve @@ -3,7 +3,7 @@ # /usr/local/sbin/localwebresolve # Copyright 2002 Jonas Smedegaard # -# $Id: localwebresolve,v 1.11 2005-03-22 02:21:17 jonas Exp $ +# $Id: localwebresolve,v 1.12 2005-03-25 14:27:33 jonas Exp $ # # Webstats maintenance script # @@ -69,9 +69,9 @@ if [ -x "$JDRESOLVE_BIN" -a -n "$JDRESOLVE_DB" ]; then test -d $(dirname "$JDRESOLVE_DB") || exit1 "Cache dir for jdresolve doesn't exist" if [ -n "$JDRESOLVE_EXPIRY" ]; then if [ $DEBUG ]; then - jdresolve $JDRESOLVE_OPTIONS --expiredb="$JDRESOLVE_EXPIRY" + find "$JDRESOLVE_DB" -mtime +1 -exec jdresolve $JDRESOLVE_OPTIONS --expiredb="$JDRESOLVE_EXPIRY" ';' else - jdresolve $JDRESOLVE_OPTIONS --expiredb="$JDRESOLVE_EXPIRY" > /dev/null 2>&1 + find "$JDRESOLVE_DB" -mtime +1 -exec jdresolve $JDRESOLVE_OPTIONS --expiredb="$JDRESOLVE_EXPIRY" ';' > /dev/null 2>&1 fi fi fi -- cgit v1.2.3