novi upstream verzije 2.8.3
[ossec-hids.git] / active-response / firewall-drop.sh
index f0e634b..820d759 100755 (executable)
@@ -29,16 +29,16 @@ RULEID=""
 ACTION=$1
 USER=$2
 IP=$3
+PWD=`pwd`
+LOCK="${PWD}/fw-drop"
+LOCK_PID="${PWD}/fw-drop/pid"
 
 
 LOCAL=`dirname $0`;
 cd $LOCAL
 cd ../
-PWD=`pwd`
 filename=$(basename "$0")
 
-LOCK="${PWD}/fw-drop"
-LOCK_PID="${LOCK}/pid"
 LOG_FILE="${PWD}/../logs/active-responses.log"
 
 echo "`date` $0 $1 $2 $3 $4 $5" >> ${LOG_FILE}
@@ -161,7 +161,6 @@ if [ "X${UNAME}" = "XLinux" ]; then
    COUNT=0;
    lock;
    while [ 1 ]; do
-       echo ".."
         ${IPTABLES} ${ARG1}
         RES=$?
         if [ $RES = 0 ]; then
@@ -177,6 +176,7 @@ if [ "X${UNAME}" = "XLinux" ]; then
         fi
    done
    
+   COUNT=0;
    while [ 1 ]; do
         ${IPTABLES} ${ARG2}
         RES=$?