webif/var/mongoose/include/restart.jim
hummypkg b378ec1b9c create system class and use it. Expand rsv fetch to include ersvtype
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@344 2a923420-c742-0410-a762-8d5b09965624
2011-09-02 19:50:10 +00:00

44 lines
988 B
Plaintext
Executable File

#!/mod/bin/jimsh
source /mod/var/mongoose/lib/setup
require system.class
if {[file exists /tmp/.restartpending]} {
puts {
<center>
<div style="width: 60%; height: 0.7em;
background: url(/img/stripes.gif) repeat-x;"></div>
<div style="font-size: 1.2em; width: 60%; text-align: center; padding: 0.5em">
A restart is required in order to complete a scheduling operation.
<br>
<font class=blood>
}
if {[system busy]} {
puts "Cannot restart whilst box is busy."
} else {
puts {
Restart via the remote control or
<small><button id=restart_humaxtv>Restart now</button></small>
}
}
puts {
</font>
</div>
<div style="width: 60%; height: 0.7em; margin-bottom: 2em;
background: url(/img/stripes.gif) repeat-x;"></div>
</center>
<script type=text/javascript>
$('#restart_humaxtv').button();
$('#restart_humaxtv').click(function() {
if (confirm('Are you sure you wish to perform a restart now?'))
window.location = '/cgi-bin/restart.jim';
});
</script>
}
}