#!/bin/sh # This grabs the last IP to make a surink from the access log. LINES=1 # 1 is pretty liberal. Beef it up a little (to 10) for more "security" ACCESSLOG=/home/hendry/logs/surink.com/http/access.log LASTSURINKIP=`tail -n$LINES $ACCESSLOG | grep "GET /?uri" | awk '{print $1}' | tail -n1` #echo $LASTSURINKIP if [ "$1" == "$LASTSURINKIP" ] ;then exit 1 fi