summaryrefslogtreecommitdiffstats
path: root/client/shared/lib/httpd/LogTrack.sh
blob: 5e2cbf9357e2d2c6f5342ae83b4694a22f392eec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
echo "Content-type: text/html"
echo ""
echo "<html><head><meta http-equiv='Refresh' content='5,URL=./LogTrack.sh'> <link rel='stylesheet' type='text/css' href='oglive.css' /> <title>Bash as CGI"
echo "</title></head><body>"

$(strings /tmp/track.log > /tmp/track.log.tmp)

echo "<table>"

echo "<tr>"


echo "<TEXTAREA NAME='trackloghead' ROWS='10' COLS='175'>"
echo "$(head -n 10 /tmp/track.log.tmp)"
echo "</TEXTAREA>"

echo "</tr>"


echo "<tr>"

echo "<TEXTAREA NAME='tracklogtail' ROWS='10' COLS='175'>"
echo "$(tail -n 5 /tmp/track.log.tmp)"
echo "</TEXTAREA>"


echo "</tr>"

echo "</table>"


echo "</body></html>"