From f59f53e780cb0ce6e38b6941f10b7d2590fa8ae4 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 11 May 2004 10:23:02 +0000 Subject: Only purge old jdresolve records if the db exists. --- localwebresolve | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/localwebresolve b/localwebresolve index 3b4f17d..6deecdd 100755 --- a/localwebresolve +++ b/localwebresolve @@ -3,7 +3,7 @@ # /usr/local/sbin/localwebresolve # Copyright 2002 Jonas Smedegaard # -# $Id: localwebresolve,v 1.6 2004-05-11 10:20:58 jonas Exp $ +# $Id: localwebresolve,v 1.7 2004-05-11 10:23:02 jonas Exp $ # # Webstats maintenance script # @@ -64,7 +64,7 @@ test -d $LOGROOT || exit1 "Logroot \"$LOGROOT\" doesn't exist" if [ -x "$JDRESOLVE_BIN" -a -n "$JDRESOLVE_DB" ]; then JDRESOLVE_OPTIONS="$JDRESOLVE_OPTIONS --database=\"$JDRESOLVE_DB\"" test -d $(dirname "$JDRESOLVE_DB") || exit1 "Cache dir for jdresolve doesn't exist" - if [ -n "$JDRESOLVE_EXPIRY" ]; then + if [ -f "$JDRESOLVE_DB" -a -n "$JDRESOLVE_EXPIRY" ]; then jdresolve $JDRESOLVE_OPTIONS --expiredb="$JDRESOLVE_EXPIRY" fi fi -- cgit v1.2.3