vesta/web/restart/system/index.php

18 lines
410 B
PHP
Raw Permalink Normal View History

2013-10-23 14:01:43 +03:00
<?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);
2013-11-02 16:43:40 +02:00
$_SESSION['error_msg'] = 'The system is going down for reboot NOW!';
2013-10-23 14:01:43 +03:00
}
unset($output);
2013-10-23 14:01:43 +03:00
}
2015-06-03 02:31:03 +03:00
header("Location: /list/server/");
2013-10-23 14:01:43 +03:00
exit;