Tripp Lite B092-016 Owner's Manual Page 161

  • Download
  • Add to my manuals
  • Print
  • Page
    / 242
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 160
161
Create a file calle
d "
widget
-
<name>.sh
" in the folder
/etc/config/scripts/
where <
name
> can be
anything. You can have as many custom dashboard files as you want.
Inside this file you can put any code you wish. When configuring thedashboard, choose "
widget
-
<name>.sh
" in the
dropdown list. The dashboard will run the script and display the output of the script
commands directly on the screen, inside thespecific widget.
The best way to format the output would be to send HTML commands back to the browser by adding
echo commands
in the script:
echo '<table>'
You can
,
of course
,
run any command and its output will be displayed in the widget window directly.
Below is a sa
mple script which writes the curren
t date to a file, and then echoe
s HTML code back to the
browser. The HTML cod
e gets an image from a specific URL and displays it inthe widget.
#!/bin/sh
date >> /tmp/test
echo '<table>'
echo '<tr><td> This is my custom script running </td></tr>'
echo '<tr><td>'
echo '<img src="http://www.vinras.com/images/linux
-
online
-
inc.jpg">'
echo '</td></tr>'
echo '</table>'
exit 0
Page view 160
1 2 ... 156 157 158 159 160 161 162 163 164 165 166 ... 241 242

Comments to this Manuals

No comments