mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
system reboot
This commit is contained in:
parent
f6150910a2
commit
465e8bfa18
6 changed files with 157 additions and 8 deletions
|
@ -19,6 +19,15 @@ if ($_SESSION['user'] == 'admin') {
|
|||
break;
|
||||
default: header("Location: /list/services/"); exit;
|
||||
}
|
||||
|
||||
if ((!empty($_POST['system'])) && ($action == 'restart')) {
|
||||
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;
|
||||
}
|
||||
|
||||
foreach ($service as $value) {
|
||||
$value = escapeshellarg($value);
|
||||
exec (VESTA_CMD.$cmd." ".$value, $output, $return_var);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue