18
Feb

Apache için basit bir log viewer

   Posted by: myownshadow   in Yazılım

#!/bin/
if [ ! -f /tmp/logcopy ]
then
echo "first run, copying log file"
cp /var/log//access.log /tmp/logcopy
fi
oldfilehash=`md5sum /tmp/logcopy | cut -d " " -f1`
newfilehash=`md5sum /var/log/2/access.log | cut -d " " -f1`
if [ "$oldfilehash" != "$newfilehash" ]; then
diff /var/log/apache2/access.log /tmp/logcopy > /tmp/logdiff
if [ ! $? -eq 0 ]; then
cat /tmp/logdiff | --title "Apache " --text-info --width 1024 --height 800
fi
cp -u /var/log/apache2/access.log /tmp/logcopy
fi
exit

/usr/local/bin altına kaydedip kullanabilirsiniz.

Bookmark and Share
Tags: , , , , , ,

Tags: , , , , , ,

This entry was posted on Thursday, February 18th, 2010 at 15:50 and is filed under Yazılım. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Cevap veya Yorum Yaz

İsminiz
e-Mail (Burada yayınlanmayacak endişelenmeyin)
Web Siteniz
Yorumunuz

Switch to our mobile site