Skip to content

Commit 01d32a4

Browse files
committed
bulk update module
1 parent 570d932 commit 01d32a4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

web/bulk/vesta/index.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
// Init
3+
error_reporting(NULL);
4+
ob_start();
5+
session_start();
6+
7+
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
8+
9+
$pkg = $_POST['pkg'];
10+
$action = $_POST['action'];
11+
12+
if ($_SESSION['user'] == 'admin') {
13+
switch ($action) {
14+
case 'update': $cmd='v-update-sys-vesta';
15+
break;
16+
default: header("Location: /list/updates/"); exit;
17+
}
18+
foreach ($pkg as $value) {
19+
$value = escapeshellarg($value);
20+
exec (VESTA_CMD.$cmd." ".$value, $output, $return_var);
21+
}
22+
}
23+
24+
header("Location: /list/updates/");

0 commit comments

Comments
 (0)