tazpkg rev 765
pkgs.cgi: non root support (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Apr 06 18:28:46 2015 +0200 (2015-04-06) |
parents | 7a731e6f61a6 |
children | 4deec1ba8aad |
files | tazpanel/pkgs.cgi |
line diff
1.1 --- a/tazpanel/pkgs.cgi Mon Apr 06 18:21:06 2015 +0200 1.2 +++ b/tazpanel/pkgs.cgi Mon Apr 06 18:28:46 2015 +0200 1.3 @@ -1345,9 +1345,13 @@ 1.4 <section> 1.5 <header> 1.6 $(_ 'Latest log entries') 1.7 +EOT 1.8 + [ "$REMOTE_USER" == "root" ] && cat << EOT 1.9 <form action="index.cgi"> 1.10 <button name="file" value="$LOG" data-icon="view">$(_ 'Show')</button> 1.11 </form> 1.12 +EOT 1.13 + cat << EOT 1.14 </header> 1.15 <pre>$(tail -n 5 $LOG | tac | fgrep "-" | awk '{print $1, $2, $3, $4, $5, "<a href=\"?info=" $6 "\">" $6 "</a>", $7}')</pre> 1.16 </section>