#!/mod/bin/jimsh
if {[file exists /tmp/.restartpending]} {
puts {
A restart is required in order to complete a scheduling operation.
}
# Is humaxtv doing anything?
set pid [exec pgrep humaxtv]
set c 0
catch { set c [exec /mod/bin/lsof -p $pid | grep Video | fgrep .ts | wc -l] }
if {$c > 0} {
puts "Cannot restart whilst box is busy."
} else {
puts {
Restart via the remote control or
}
}
puts {