diff options
author | irina <irinagomez@us.es> | 2014-02-27 08:10:42 +0000 |
---|---|---|
committer | irina <irinagomez@us.es> | 2014-02-27 08:10:42 +0000 |
commit | 21c226b78526a441251e2aaee08a693e2c9b5585 (patch) | |
tree | 0cb9f7726755b41c31e096f958f6e28ade0a1322 /client/shared/lib/httpd | |
parent | 2ef79da3b08434e9ed29e769230898c463c9c27e (diff) |
#636 consola de log en utf-8
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4161 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/shared/lib/httpd')
-rwxr-xr-x | client/shared/lib/httpd/LogCommand.sh | 8 | ||||
-rwxr-xr-x | client/shared/lib/httpd/LogSession.sh | 5 | ||||
-rwxr-xr-x | client/shared/lib/httpd/httpd-log.sh | 6 |
3 files changed, 12 insertions, 7 deletions
diff --git a/client/shared/lib/httpd/LogCommand.sh b/client/shared/lib/httpd/LogCommand.sh index b61fb6e6..0fc65413 100755 --- a/client/shared/lib/httpd/LogCommand.sh +++ b/client/shared/lib/httpd/LogCommand.sh @@ -1,4 +1,6 @@ #!/bin/bash +OGLOGCOMMAND=${OGLOGCOMMAND:-"/tmp/command.log"} +OGLOGCOMMANDTMP=$OGLOGCOMMAND.tmp echo "Content-type: text/html" echo "" echo "<html><head>" @@ -6,7 +8,7 @@ echo "<meta charset='utf-8'>" echo "<meta http-equiv='Refresh' content='5,URL=./LogCommand.sh'> <link rel='stylesheet' type='text/css' href='oglive.css' />" echo "<title>Bash as CGI</title></head><body>" -$(strings -e S /tmp/command.log > /tmp/command.log.tmp) +$(strings -e S $OGLOGCOMMAND > $OGLOGCOMMANDTMP) echo "<table>" @@ -16,7 +18,7 @@ echo "<tr>" echo "<TEXTAREA NAME='trackloghead' ROWS='13' COLS='175'>" #echo "$(head -n 10 /tmp/command.log.tmp | uniq)" # UHU - 2013/07/05 - Se incluye el simbolo % y la palabra sent para que se muestre la salida de rsync -echo "$(egrep -v '^bytes|%|sent|^Elapsed:|^Total [Tt]ime:|^-|^\\|^\/' /tmp/command.log.tmp | uniq | head -n 15)" +echo "$(egrep -v '^bytes|%|sent|^Elapsed:|^Total [Tt]ime:|^-|^\\|^\/' $OGLOGCOMMANDTMP | uniq | head -n 15)" echo "</TEXTAREA>" echo "</tr>" @@ -27,7 +29,7 @@ echo "<tr>" echo "<TEXTAREA NAME='tracklogtail' ROWS='2' COLS='175'>" #echo "$(tail -n 5 /tmp/command.log.tmp | uniq)" # UHU - 2013/07/05 - Se incluye el simbolo % y la palabra sent para que se muestre la salida de rsync -echo "$(egrep '^bytes|%|sent|^Elapsed:|^Total [Tt]ime:|^-|^\\|^\/' /tmp/command.log.tmp | uniq | tail -n 2)" +echo "$(egrep '^bytes|%|sent|^Elapsed:|^Total [Tt]ime:|^-|^\\|^\/' $OGLOGCOMMANDTMP | uniq | tail -n 2)" echo "</TEXTAREA>" diff --git a/client/shared/lib/httpd/LogSession.sh b/client/shared/lib/httpd/LogSession.sh index 250f382e..7e390925 100755 --- a/client/shared/lib/httpd/LogSession.sh +++ b/client/shared/lib/httpd/LogSession.sh @@ -1,8 +1,9 @@ #!/bin/bash +OGLOGSESSION=${OGLOGSESSION:-"/tmp/session.log"} echo "Content-type: text/html" echo "" echo "<html><head>" -echo " <meta charset='utf-8'" +echo " <meta charset='utf-8'>" echo " <meta http-equiv='Refresh' content='5,URL=./LogSession.sh'>" echo " <title>Bash as CGI</title>" @@ -22,7 +23,7 @@ echo "</style>" echo "</head><body>" echo "<TEXTAREA NAME='contenido' ROWS='115' COLS='175' >" -echo "$(cat /tmp/session.log | uniq )" +uniq $OGLOGSESSION echo "</TEXTAREA>" echo "</body></html>" diff --git a/client/shared/lib/httpd/httpd-log.sh b/client/shared/lib/httpd/httpd-log.sh index 0e1deade..d357a6ed 100755 --- a/client/shared/lib/httpd/httpd-log.sh +++ b/client/shared/lib/httpd/httpd-log.sh @@ -3,7 +3,9 @@ echo "Content-type: text/html" echo "" #echo "<html><head><meta http-equiv='Refresh' content='2,URL=./example3.sh'><title>Bash as CGI" -echo "<html><head><title>OpenGnsys Client</title></head><body>" +echo "<html><head><title>OpenGnsys Client</title>" +echo " <meta charset='utf-8'>" +echo "</head><body>" echo "<h1> $(./httpd-runengine.sh 'ogEcho $MSG_HTTPLOG_NOUSE' ) .</br>host $(hostname -s)</h1> " @@ -13,4 +15,4 @@ echo "<IFRAME SRC='cache.sh' WIDTH=590 HEIGHT=90><A HREF="cache.sh">link</a> echo "<IFRAME SRC='LogSession.sh' WIDTH=850 HEIGHT=230> <A HREF="LogSession.sh">link</A> </IFRAME>" echo "<IFRAME SRC='LogCommand.sh' WIDTH=850 HEIGHT=280> <A HREF="LogCommand.sh">link</A> </IFRAME>" -echo "</body>
\ No newline at end of file +echo "</body> |