summaryrefslogtreecommitdiff
path: root/localwebstats
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2004-05-11 10:23:02 +0000
committerJonas Smedegaard <dr@jones.dk>2004-05-11 10:23:02 +0000
commit82bc8d8832203b9f71cb1a56a49c1980a447f11c (patch)
tree77dd94c98440590256b5995441ae4af6a5967bb5 /localwebstats
parentd2944893ceb7bacaf689e79ae33147ff22b2a4b5 (diff)
Only purge old jdresolve records if the db exists.
Diffstat (limited to 'localwebstats')
-rwxr-xr-xlocalwebstats4
1 files changed, 2 insertions, 2 deletions
diff --git a/localwebstats b/localwebstats
index a291e99..611ad80 100755
--- a/localwebstats
+++ b/localwebstats
@@ -3,7 +3,7 @@
# /usr/local/sbin/localwebstats
# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: localwebstats,v 1.32 2004-05-11 10:20:58 jonas Exp $
+# $Id: localwebstats,v 1.33 2004-05-11 10:23:02 jonas Exp $
#
# Webstats maintenance script
#
@@ -131,7 +131,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