2011-06-07 13:26:45 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
2012-01-21 01:27:06 +00:00
|
|
|
source /mod/var/mongoose/lib/setup
|
|
|
|
require system.class
|
|
|
|
|
2011-06-07 13:26:45 +00:00
|
|
|
if { [catch {set fd [open "/mod/mediatomb/config/mediatomb.html" r]} fid] } {
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
set data [read $fd]
|
|
|
|
close $fd
|
|
|
|
regexp {URL=([^"]*)} $data match
|
|
|
|
set url [string range $match 4 [string length $match]]
|
|
|
|
|
2012-01-21 01:27:06 +00:00
|
|
|
set port [string range [lindex [split $url ":"] 2] 0 end-1]
|
|
|
|
|
|
|
|
if {![system is_listening $port]} { exit 0 }
|
|
|
|
|
2011-07-07 22:33:19 +00:00
|
|
|
puts "
|
|
|
|
<div style=\"float: left; padding-top: 5em\">
|
|
|
|
<center>
|
|
|
|
<a href=$url>
|
2011-07-12 18:57:30 +00:00
|
|
|
<img border=0 src=/img/mediatomb.png width=180>
|
2011-07-07 22:33:19 +00:00
|
|
|
</a>
|
|
|
|
<br>
|
|
|
|
<a href=$url>
|
|
|
|
<b>MediaTomb</b>
|
|
|
|
</a>
|
|
|
|
<br>
|
|
|
|
</center>
|
|
|
|
</div>
|
|
|
|
"
|
2011-06-07 13:26:45 +00:00
|
|
|
|