summaryrefslogtreecommitdiff
path: root/localwebresolve
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2005-03-25 14:27:33 +0000
committerJonas Smedegaard <dr@jones.dk>2005-03-25 14:27:33 +0000
commit8209f212c50375b0d1191065cfff6e1c88c6db75 (patch)
tree0835d42ca2b9ffb3efdae303e4cb8085fb8e539e /localwebresolve
parent0f2cf892f234aafbc06f1d8c7587d5a768c64e28 (diff)
Cleanup jdresolve db only after an hour of inactivity (to avoid cleanup delay at every month of every host).
Diffstat (limited to 'localwebresolve')
-rwxr-xr-xlocalwebresolve6
1 files changed, 3 insertions, 3 deletions
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 <dr@jones.dk>
#
-# $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