2011-07-07 22:33:19 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
2012-05-21 20:23:41 +00:00
|
|
|
source /mod/webif/lib/setup
|
2011-09-02 19:50:10 +00:00
|
|
|
require system.class
|
|
|
|
|
2011-07-08 20:39:57 +00:00
|
|
|
if {[file exists /tmp/.restartpending]} {
|
2011-07-07 22:33:19 +00:00
|
|
|
|
|
|
|
puts {
|
|
|
|
<center>
|
2011-07-08 20:39:57 +00:00
|
|
|
<div style="width: 60%; height: 0.7em;
|
2011-07-07 22:33:19 +00:00
|
|
|
background: url(/img/stripes.gif) repeat-x;"></div>
|
2011-07-08 20:39:57 +00:00
|
|
|
<div style="font-size: 1.2em; width: 60%; text-align: center; padding: 0.5em">
|
2011-07-12 18:57:30 +00:00
|
|
|
A restart is required in order to complete a scheduling operation.
|
2011-07-08 20:39:57 +00:00
|
|
|
<br>
|
|
|
|
<font class=blood>
|
|
|
|
}
|
|
|
|
|
2011-09-02 19:50:10 +00:00
|
|
|
if {[system busy]} {
|
2011-07-08 20:39:57 +00:00
|
|
|
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 {
|
2012-02-07 22:48:54 +00:00
|
|
|
<small><button id=restart_cancel>Dismiss</button></small>
|
2011-07-08 20:39:57 +00:00
|
|
|
</font>
|
2011-07-07 22:33:19 +00:00
|
|
|
</div>
|
2011-07-08 20:39:57 +00:00
|
|
|
<div style="width: 60%; height: 0.7em; margin-bottom: 2em;
|
2011-07-07 22:33:19 +00:00
|
|
|
background: url(/img/stripes.gif) repeat-x;"></div>
|
|
|
|
</center>
|
2011-07-08 20:39:57 +00:00
|
|
|
<script type=text/javascript>
|
2012-01-05 22:42:45 +00:00
|
|
|
$('#restart_humaxtv').button()
|
|
|
|
.click(function() {
|
2011-08-31 21:47:43 +00:00
|
|
|
if (confirm('Are you sure you wish to perform a restart now?'))
|
2012-11-25 00:22:18 +00:00
|
|
|
if (confirm('Really sure?\n\nThere is a small chance the ' +
|
|
|
|
' Humax may not restart\n' +
|
|
|
|
'without physical intervention.\n\n' +
|
|
|
|
'i.e. pressing the standby button or using the ' +
|
|
|
|
'remote control'))
|
|
|
|
window.location = '/cgi-bin/restart.jim';
|
2011-07-08 20:39:57 +00:00
|
|
|
});
|
2012-01-05 22:42:45 +00:00
|
|
|
$('#restart_cancel').button()
|
|
|
|
.click(function() {
|
|
|
|
$.get('/cgi-bin/restart.jim?act=cancel');
|
|
|
|
$('#restart_block').slideUp('slow');
|
|
|
|
});
|
2011-07-08 20:39:57 +00:00
|
|
|
</script>
|
|
|
|
}
|
|
|
|
|
2011-07-07 22:33:19 +00:00
|
|
|
}
|
|
|
|
|