diff options
author | irina <irinagomez@us.es> | 2014-02-17 08:32:59 +0000 |
---|---|---|
committer | irina <irinagomez@us.es> | 2014-02-17 08:32:59 +0000 |
commit | 4fcbcc8308f82aed30288e0d25b83ebae13c85ea (patch) | |
tree | 1ad0bdbf8ba606ed7c72c17335835baedc64807f /client/shared/lib/httpd | |
parent | 993c3283b3b8c0df4fce82b210f62ad361edf06e (diff) |
#636 #537 Log en tiempo real. En los script de restauracion los mensajes se envian a session.log y las salidas de los comandos a commad.log. utf-8 en la pagina que muestra los log
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4149 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/shared/lib/httpd')
-rwxr-xr-x | client/shared/lib/httpd/LogCommand.sh | 12 | ||||
-rwxr-xr-x | client/shared/lib/httpd/LogSession.sh | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/client/shared/lib/httpd/LogCommand.sh b/client/shared/lib/httpd/LogCommand.sh index 22a73251..54c4881e 100755 --- a/client/shared/lib/httpd/LogCommand.sh +++ b/client/shared/lib/httpd/LogCommand.sh @@ -1,8 +1,10 @@ #!/bin/bash echo "Content-type: text/html" echo "" -echo "<html><head><meta http-equiv='Refresh' content='5,URL=./LogCommand.sh'> <link rel='stylesheet' type='text/css' href='oglive.css' /> <title>Bash as CGI" -echo "</title></head><body>" +echo "<html><head>" +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 /tmp/command.log > /tmp/command.log.tmp) @@ -14,7 +16,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 '%|sent|^Elapsed:\|^Total [Tt]ime:\|^-\|^|\|^bytes\|^\[' /tmp/command.log.tmp | uniq | head -n 15)" +echo "$(egrep -v '^bytes|%|sent|^Elapsed:|^Total [Tt]ime:|^-|^\\|^\/' /tmp/command.log.tmp | uniq | head -n 15)" echo "</TEXTAREA>" echo "</tr>" @@ -25,7 +27,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 '%|sent|^Elapsed:\|^Total [Tt]ime:\|^-\|^|\|^bytes' /tmp/command.log.tmp | uniq | tail -n 2)" +echo "$(egrep '^bytes|%|sent|^Elapsed:|^Total [Tt]ime:|^-|^\\|^\/' /tmp/command.log.tmp | uniq | tail -n 2)" echo "</TEXTAREA>" @@ -34,4 +36,4 @@ echo "</tr>" echo "</table>" -echo "</body></html>"
\ No newline at end of file +echo "</body></html>" diff --git a/client/shared/lib/httpd/LogSession.sh b/client/shared/lib/httpd/LogSession.sh index a5d18e68..250f382e 100755 --- a/client/shared/lib/httpd/LogSession.sh +++ b/client/shared/lib/httpd/LogSession.sh @@ -1,8 +1,10 @@ #!/bin/bash echo "Content-type: text/html" echo "" -echo "<html><head> <meta http-equiv='Refresh' content='5,URL=./LogSession.sh'> <title>Bash as CGI" -echo "</title>" +echo "<html><head>" +echo " <meta charset='utf-8'" +echo " <meta http-equiv='Refresh' content='5,URL=./LogSession.sh'>" +echo " <title>Bash as CGI</title>" echo "<style type='text/css'>" echo "<!--" @@ -17,15 +19,11 @@ echo "} " echo "-->" echo "</style>" - - echo "</head><body>" echo "<TEXTAREA NAME='contenido' ROWS='115' COLS='175' >" echo "$(cat /tmp/session.log | uniq )" echo "</TEXTAREA>" - - echo "</body></html>" |