X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/932d945b7f897fd18be7d4c2fac3eda3915aa296..b90b3e3b4b0451f9d0f521478952aa26f77786cf:/utils/cron_banip.sh diff --git a/utils/cron_banip.sh b/utils/cron_banip.sh index 1f0aade6..c73db560 100755 --- a/utils/cron_banip.sh +++ b/utils/cron_banip.sh @@ -3,8 +3,14 @@ # 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'