mirror of
https://github.com/myvesta/vesta.git
synced 2024-11-04 20:50:23 -08:00
22 lines
508 B
PHP
22 lines
508 B
PHP
<?php
|
|
// Init
|
|
error_reporting(NULL);
|
|
ob_start();
|
|
session_start();
|
|
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|
|
|
// Check token
|
|
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
|
|
header('location: /login/');
|
|
exit();
|
|
}
|
|
|
|
if ($_SESSION['user'] == 'admin') {
|
|
exec (VESTA_CMD."v-add-cron-vesta-autoupdate", $output, $return_var);
|
|
$_SESSION['error_msg'] = __('Autoupdate has been successfully enabled');
|
|
unset($output);
|
|
}
|
|
|
|
header("Location: /list/updates/");
|
|
exit;
|