From 41cab5b08613c45fa3b888c7af46ce72fc58b515 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 20 Aug 2012 00:00:47 +0200 Subject: [PATCH] get rid of absolute paths --- utils/cron_banip.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/utils/cron_banip.sh b/utils/cron_banip.sh index 1f0aade6..f40a4227 100755 --- a/utils/cron_banip.sh +++ b/utils/cron_banip.sh @@ -1,10 +1,16 @@ -#!/bin/bash +#!/bin/bash -x # # Create or update the list of temporarily banned IPs. # -BLOCKEDFILE=/home/lonvia/nominatim/settings/ip_blocks -LOGFILE=/home/lonvia/nominatim/log/ip_blocks.log +BASEDIR="$( cd "$( dirname "$0" )" && cd .. && pwd )" +if [ "x$BASEDIR" == "x" ]; then + echo "Could not determine base dir." + exit -1 +fi + +BLOCKEDFILE=$BASEDIR/settings/ip_blocks +LOGFILE=$BASEDIR/log/ip_blocks.log LONG_PERIOD='1 hour' SHORT_PERIOD='10 min' -- 2.39.5