webif/var/mongoose/include/services.jim
hummypkg 7400437a1f add iphone checkboxes and improve services screen
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@191 2a923420-c742-0410-a762-8d5b09965624
2011-06-22 00:21:48 +00:00

29 lines
654 B
Plaintext
Executable File

#!/mod/bin/jimsh
set services [split [exec /mod/bin/service mlist]]
foreach service $services {
set data [split $service ":"]
set name [lindex $data 0]
set installed [lindex $data 1]
set auto [lindex $data 2]
set running [lindex $data 3]
puts "<tr><td class=even>$name</td>"
if (!$installed) {
puts "<td colspan=3><i>Not installed</i></td></tr>"
continue
}
puts -nonewline "<td><input type=checkbox class=auto name=\"$name\""
if ($auto) { puts -nonewline " checked" }
puts "></td>"
puts -nonewline "<td><input type=checkbox class=toggle name=\"$name\"""
if ($running) { puts -nonewline " checked" }
puts "></td>"
puts "</tr>"
}