#!/mod/bin/jimsh

source /mod/webif/lib/setup
require system.class
set class "class=hidden"
if {[system isrestartpending]} {
	require rsv.class
	if {[rsv count pending] <= 0} {
		system restartpending 0
	} else {
		set class ""
	}
}

puts "<div id=restart_block $class>"
puts {
	<div style="width: 100%; height: 0.7em;
	    background: url(/img/stripes.gif) repeat-x;"></div>
	<div>
	Restart required.
}
if {[system busy]} {
	puts "<div class=blood><i>System busy...</i></div>"
} else {
	puts {
		<button class=red id=restart_humaxtv>Reboot now</button>
		<script type=text/javascript src=/js/restart.js></script>
	}
}

puts {
	</div>
	<div style="width: 100%; height: 0.7em;
	    background: url(/img/stripes.gif) repeat-x;"></div>
	</div>
}

