mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
system reboot
This commit is contained in:
parent
f6150910a2
commit
465e8bfa18
6 changed files with 157 additions and 8 deletions
17
web/restart/system/index.php
Normal file
17
web/restart/system/index.php
Normal 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;
|
Loading…
Add table
Add a link
Reference in a new issue