updates for running under apache
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif@162 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
d3e7adfd1f
commit
01b067bdeb
@ -1,6 +1,9 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
set pid [exec pgrep humaxtv]
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
|
||||
if {[catch {set pid [exec pgrep humaxtv]}]} { exit }
|
||||
|
||||
if {[catch {set data [exec lsof -p $pid | grep Video | fgrep .ts]} ]} {
|
||||
exit
|
||||
@ -40,8 +43,6 @@ foreach line $lines {
|
||||
}
|
||||
|
||||
if {[llength $output]} {
|
||||
puts "Content-Type: text/html"
|
||||
puts ""
|
||||
puts [join $output "<br>\n"]
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!--#include virtual="/lib/header.shtml" -->
|
||||
<!--#exec "/mod/var/mongoose/include/db.jim" -->
|
||||
<!--#exec cmd="/mod/var/mongoose/include/db.jim" -->
|
||||
<!--#include virtual="/lib/footer.shtml" -->
|
||||
|
||||
|
@ -4,6 +4,6 @@ Search EPG: <input name=term size=20 maxlength=255>
|
||||
<input type=checkbox name=full>Search descriptions as well as titles.
|
||||
<input type=submit value=Search>
|
||||
</form>
|
||||
<!--#exec "/mod/var/mongoose/include/epg.jim" -->
|
||||
<!--#exec cmd="/mod/var/mongoose/include/epg.jim" -->
|
||||
<!--#include virtual="/lib/footer.shtml" -->
|
||||
|
||||
|
@ -17,11 +17,14 @@ function updateResults()
|
||||
var r = document.getElementById('status');
|
||||
if (r && request.readyState == 4 && request.status == 200)
|
||||
{
|
||||
r.style.display = 'block';
|
||||
var t = document.getElementById('status_txt');
|
||||
if (t.length)
|
||||
{
|
||||
r.style.display = 'block';
|
||||
t.innerHTML = request.responseText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function go()
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!-- Start of footer -->
|
||||
<div class=footer>
|
||||
<ul>
|
||||
<li><!--#exec "/mod/var/mongoose/include/mediatomb.jim" -->
|
||||
<li><!--#exec cmd="/mod/var/mongoose/include/mediatomb.jim" -->
|
||||
MediaTomb Web Interface</a>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -8,7 +8,7 @@
|
||||
Humax HD[R] Fox T2
|
||||
</span>
|
||||
<!-- Start include diskspace -->
|
||||
<!--#exec "/mod/var/mongoose/include/diskspace.jim" -->
|
||||
<!--#exec cmd="/mod/var/mongoose/include/diskspace.jim" -->
|
||||
<!-- End include diskspace -->
|
||||
</div>
|
||||
<div class=right><img src=/images/154_1_00_WIN_MD116_3R.png></div>
|
||||
|
@ -9,6 +9,6 @@ Results...
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--#exec "/mod/var/mongoose/include/packages.jim" -->
|
||||
<!--#exec cmd="/mod/var/mongoose/include/packages.jim" -->
|
||||
|
||||
<!--#include virtual="/lib/footer.shtml" -->
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!--#include virtual="/lib/header.shtml" -->
|
||||
<!--#exec "/mod/var/mongoose/include/sched.jim" -->
|
||||
<!--#exec cmd="/mod/var/mongoose/include/sched.jim" -->
|
||||
<!--#include virtual="/lib/footer.shtml" -->
|
||||
|
||||
|
@ -53,6 +53,6 @@ Results...
|
||||
<th>Auto Startup</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
<!--#exec "/mod/var/mongoose/include/services.jim" -->
|
||||
<!--#exec cmd="/mod/var/mongoose/include/services.jim" -->
|
||||
</table>
|
||||
<!--#include virtual="/lib/footer.shtml" -->
|
||||
|
@ -1,5 +1,10 @@
|
||||
#!/mod/bin/jimsh
|
||||
|
||||
if {[os.gethostname] eq "hosting"} {
|
||||
set size "1TB"
|
||||
set used "100GB"
|
||||
set perc "10"
|
||||
} else {
|
||||
foreach df [split [exec df -h] "\n\r"] {
|
||||
if [string match *sda2* $df] {
|
||||
regsub -all -- {[[:space:]]+} $df " " df
|
||||
@ -9,6 +14,7 @@ foreach df [split [exec df -h] "\n\r"] {
|
||||
set perc [string trimright [lindex $fields 4] "%"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set file [format "%02d" [expr {$perc * 25 / 100 + 1}]]
|
||||
|
||||
|
@ -4,7 +4,10 @@ if {[expr ! [exists -proc sqlite3.open ]]} { package require sqlite3 }
|
||||
|
||||
source /mod/var/mongoose/lib/progressbar
|
||||
|
||||
set channeldb 0
|
||||
catch {
|
||||
set channeldb [sqlite3.open /var/lib/humaxtv/channel.db]
|
||||
}
|
||||
|
||||
# * service_id, event_id, start, duration, encrypted, name, text
|
||||
# * warning, content code, content type,
|
||||
@ -143,7 +146,7 @@ proc {epg parse} {line} {
|
||||
proc {epg cleanup} {} {
|
||||
global channeldb
|
||||
|
||||
$channeldb close
|
||||
if $channeldb { $channeldb close }
|
||||
}
|
||||
|
||||
proc {epg exec} {mode args} {
|
||||
@ -178,12 +181,14 @@ proc {epg fetch} {mode args} {
|
||||
|
||||
foreach line [split [epg exec $mode {*}$args] "\n"] {
|
||||
set record [epg parse $line]
|
||||
if $channeldb {
|
||||
set chan [lindex [$channeldb query {
|
||||
select szSvcName, usLcn from TBL_SVC
|
||||
where usSvcId = %s} "[$record get service_id]"
|
||||
] 0]
|
||||
$record channel $chan(usLcn) \
|
||||
[string range $chan(szSvcName) 1 end]
|
||||
}
|
||||
|
||||
lappend records $record
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user