diff options
author | Jonas Smedegaard <dr@jones.dk> | 2004-05-11 10:23:02 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2004-05-11 10:23:02 +0000 |
commit | f59f53e780cb0ce6e38b6941f10b7d2590fa8ae4 (patch) | |
tree | 86394e1d0a94716005d7d1c0be6989afa5957bfb /localwebresolve | |
parent | 4c0b8219fccd0b04bb0391627b3411a74bedab7a (diff) |
Only purge old jdresolve records if the db exists.
Diffstat (limited to 'localwebresolve')
-rwxr-xr-x | localwebresolve | 4 |
1 files 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 <dr@jones.dk> # -# $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 |