exec("screen -X -S yawep_screen_player quit");
}
+ if ( isset($_GET['reboot']) ) {
+
+ exec("sudo reboot");
+ }
if ( isset($_GET['bgonoff']) ) {
if ( $_GET['bgonoff'] == 'true' ) {
$config['is_bg'] = 1;
print "</table>";
print "<hr/>";
print "<button type=\"button\" class=\"btn btn-success\" name=\"start\">Start</button>";
- print "<button type=\"button\" class=\"btn btn-danger\" name=\"stop\" >Stop</button>";
+ print "<button type=\"button\" class=\"btn btn-warning\" name=\"stop\" >Stop</button>";
print "<button type=\"button\" class=\"btn btn-info\" name=\"status\" >Status</button>";
+ print "<button type=\"button\" class=\"btn btn-danger\" name=\"reboot\" >Reboot</button>";
print "<input type=\"checkbox\" name=\"bgonoff\" id=\"checkbox1\" $is_bg_checked_html><label for=\"checkbox1\">Show background</label></div>";
print "<input type=\"checkbox\" name=\"bootonoff\" id=\"checkbox2\" $is_boot_checked_html><label for=\"checkbox2\">Start on boot</label></div>";
print "<hr/>";
;
})
});
+ $('button[name=reboot]').click(function() {
+ $.ajax({
+ type: 'GET',
+ url: 'index.php',
+ dataType: 'json',
+ data: { config: '1', reboot: '1'}
+ })
+ .done(function(msg) {
+ ;
+ })
+ .fail(function(msg) {
+ ;
+ })
+ });
$('button[name=status]').click(function() {
$.ajax({
type: 'GET',