mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 02:28:03 -07:00
Updated services and fixed minor bugs.
This commit is contained in:
parent
4306a4fb4f
commit
2a12fec5ea
90 changed files with 1706 additions and 3 deletions
28
web/api/v1/delete/cron/autoupdate/index.php
Normal file
28
web/api/v1/delete/cron/autoupdate/index.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
ob_start();
|
||||
session_start();
|
||||
header('Content-Type: application/json');
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
$message = '';
|
||||
$error = '';
|
||||
|
||||
// Check token
|
||||
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
|
||||
exit();
|
||||
}
|
||||
|
||||
if ($_SESSION['user'] == 'admin') {
|
||||
exec (VESTA_CMD."v-delete-cron-vesta-autoupdate", $output, $return_var);
|
||||
$message = __('Autoupdate has been successfully disabled');
|
||||
unset($output);
|
||||
}
|
||||
|
||||
$result = array(
|
||||
'message' => $message,
|
||||
'error' => $error
|
||||
);
|
||||
|
||||
print json_encode($result);
|
26
web/api/v1/delete/cron/reports/index.php
Normal file
26
web/api/v1/delete/cron/reports/index.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
ob_start();
|
||||
session_start();
|
||||
header('Content-Type: application/json');
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
$message = '';
|
||||
$error = '';
|
||||
|
||||
// Check token
|
||||
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
|
||||
exit();
|
||||
}
|
||||
|
||||
exec (VESTA_CMD."v-delete-cron-reports ".$user, $output, $return_var);
|
||||
$message = __('Cronjob email reporting has been successfully disabled');
|
||||
unset($output);
|
||||
|
||||
$result = array(
|
||||
'message' => $message,
|
||||
'error' => $error,
|
||||
);
|
||||
|
||||
print json_encode($result);
|
Loading…
Add table
Add a link
Reference in a new issue