]> git.openstreetmap.org Git - nominatim.git/commitdiff
get rid of absolute paths
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 19 Aug 2012 22:00:47 +0000 (00:00 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 19 Aug 2012 22:00:47 +0000 (00:00 +0200)
utils/cron_banip.sh

index 1f0aade67927e9cb9760a362cfed712386be0be7..f40a4227febc4855b64073ab903f7bd3b3fbf8b4 100755 (executable)
@@ -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'