Console Server & Router User Manual
239
Create a file called "
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 the dashboard, 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 the specific 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 an example script which writes the current date to a file, and then echo's HTML code back to the browser. The
HTML code gets an image from a specific URL and displays it in the 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
Содержание ACM5000
Страница 3: ......
Страница 10: ...Table of Contents 10 Console Server RIM Gateway User Manual...
Страница 11: ......
Страница 94: ...Chapter 5 Firewall Failover and Out of Band 94 Console Server RIM Gateway User Manual...
Страница 119: ......
Страница 149: ......
Страница 191: ......
Страница 205: ......
Страница 225: ......
Страница 303: ......
Страница 313: ......
Страница 323: ......