system reboot

This commit is contained in:
Serghey Rodin 2013-10-23 14:01:43 +03:00
commit 465e8bfa18
6 changed files with 157 additions and 8 deletions

View file

@ -0,0 +1,17 @@
<?php
// Init
error_reporting(NULL);
ob_start();
session_start();
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
if ($_SESSION['user'] == 'admin') {
if (!empty($_GET['hostname'])) {
exec (VESTA_CMD."v-restart-system yes", $output, $return_var);
$_SESSION['error_srv'] = 'The system is going down for reboot NOW!';
}
unset($output);
}
header("Location: /list/services/");
exit;