mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
Merge changes from upstream
This commit is contained in:
parent
8fb1fa5482
commit
c094d8582d
54 changed files with 4981 additions and 5671 deletions
22
web/start/service/index.php
Normal file
22
web/start/service/index.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
ob_start();
|
||||
session_start();
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
if (!empty($_GET['srv'])) {
|
||||
$v_service = escapeshellarg($_GET['srv']);
|
||||
exec (VESTA_CMD."v-start-service ".$v_service, $output, $return_var);
|
||||
}
|
||||
if ($return_var != 0) {
|
||||
$error = implode('<br>', $output);
|
||||
if (empty($error)) $error = 'Error: service '.$v_service.' start failed';
|
||||
$_SESSION['error_srv'] = $error;
|
||||
}
|
||||
unset($output);
|
||||
}
|
||||
|
||||
header("Location: /list/services/");
|
||||
exit;
|
Loading…
Add table
Add a link
Reference in a new issue