#!/bin/sh #------------------------------------------------------------------------------ # showlog.cgi - show squid logs on the web. # # Creation: 22.02.2001 mb # Last Update: $Id$ # #------------------------------------------------------------------------------ xname=`basename $0` echo "Content-Type: text/html; charset=utf-8" echo "Cache-control: no-store" # HTTP/1.1 (or no-cache?) echo "Pragma: no-cache" # HTTP/1.0 echo "Expires: `date -Ru`" # Expires now! echo "Refresh: 5; URL=$myname" echo logdir=`cat /etc/squid/workdir`/logs datei=$1 if [ "$datei" = "" ] then datei="access.log" else if [ "$datei" != "access.log" -a "$datei" != "cache.log" ] then datei="access.log" fi fi myname=$xname'?'$datei toshow=$logdir/$datei echo '' echo "" echo 'FLI4L-Webserver - squid logs .. ('$datei')' echo '' echo '' echo '
'
tail -10 $toshow
echo '
access.log | ' echo 'cache.log
' echo '
'