webif/var/mongoose/include/services.jim
hummypkg a41c2ae6f9 add toolbar
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1008 2a923420-c742-0410-a762-8d5b09965624
2012-05-19 21:44:42 +00:00

25 lines
564 B
Plaintext
Executable File

#!/mod/bin/jimsh
set services [split [exec /mod/bin/service mlist]]
foreach service $services {
lassign [split $service ":"] name installed auto running
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>"
}