Here's the entre script, runs find from the command line:
#!/bin/bash
for i in `tail -100 /usr/local/apache/logs/access_log | awk '/408/ {print $1}'|sort`
do
x=`grep -c $i /usr/local/apache/logs/access_log`
if [ $x -gt 5 ]
then
csf -d $i 408 errors - $x -
fi
done
But it does not run via cron, here's what I have tried:
crontab -e
Then at the bottom, I insert this:
* * * * * /root/z408.sh
And again, entering the following via shell runs the script fine:
/root/z408.sh
So what could this be?
#!/bin/bash
for i in `tail -100 /usr/local/apache/logs/access_log | awk '/408/ {print $1}'|sort`
do
x=`grep -c $i /usr/local/apache/logs/access_log`
if [ $x -gt 5 ]
then
csf -d $i 408 errors - $x -
fi
done
But it does not run via cron, here's what I have tried:
crontab -e
Then at the bottom, I insert this:
* * * * * /root/z408.sh
And again, entering the following via shell runs the script fine:
/root/z408.sh
So what could this be?