2011-06-07 13:26:45 +00:00
|
|
|
#!/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]
|
|
|
|
|
2011-06-22 00:21:48 +00:00
|
|
|
puts "<tr><td class=even>$name</td>"
|
2011-06-07 13:26:45 +00:00
|
|
|
if (!$installed) {
|
|
|
|
puts "<td colspan=3><i>Not installed</i></td></tr>"
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
2011-06-22 00:21:48 +00:00
|
|
|
puts -nonewline "<td><input type=checkbox class=auto name=\"$name\""
|
|
|
|
if ($auto) { puts -nonewline " checked" }
|
|
|
|
puts "></td>"
|
2011-06-07 13:26:45 +00:00
|
|
|
|
2011-06-22 00:21:48 +00:00
|
|
|
puts -nonewline "<td><input type=checkbox class=toggle name=\"$name\"""
|
|
|
|
if ($running) { puts -nonewline " checked" }
|
|
|
|
puts "></td>"
|
2011-06-07 13:26:45 +00:00
|
|
|
|
|
|
|
puts "</tr>"
|
|
|
|
}
|
|
|
|
|