mirror of
https://github.com/myvesta/vesta.git
synced 2024-11-04 12:40:16 -08:00
24 lines
547 B
PHP
24 lines
547 B
PHP
<?php
|
|
// Init
|
|
error_reporting(NULL);
|
|
ob_start();
|
|
session_start();
|
|
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|
|
|
// Check token
|
|
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
|
|
header('location: /login/');
|
|
exit();
|
|
}
|
|
|
|
if ($_SESSION['user'] == 'admin') {
|
|
if (!empty($_GET['hostname'])) {
|
|
exec (VESTA_CMD."v-restart-system yes", $output, $return_var);
|
|
$_SESSION['error_msg'] = 'The system is going down for reboot NOW!';
|
|
}
|
|
unset($output);
|
|
}
|
|
|
|
header("Location: /list/server/");
|
|
exit;
|