#!/bin/bash #reads apache logs and outputs new server hits to tty with 3 system #beeps check(){ cat /var/log/apache/access.log > /var/log/apache/logcheck sleep 15 cmp -s /var/log/apache/access.log /var/log/apache/logcheck if [ "$?" = "0" ]; then check # else diff /var/log/apache/access.log /var/log/apache/logcheck else tail -n 5 /var/log/apache/access.log echo -e "\a" sleep 1 echo -e "\a" sleep 1 echo -e "\a" check fi } clear echo "logcheck v1.1" check