diff options
author | Minteck <contact@minteck.org> | 2022-01-01 10:37:28 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-01-01 10:37:28 +0100 |
commit | ef055e79855cf3be1ad5e1aa5f9ebad480062384 (patch) | |
tree | ff074b29a7a87c3ccfc3b10741bbe30cb28e103e /admin/api/getUpdates.php | |
parent | e3a79df6428799024eac64e9cffbb062317aeb95 (diff) | |
download | main-trunk.tar.gz main-trunk.tar.bz2 main-trunk.zip |
Diffstat (limited to 'admin/api/getUpdates.php')
-rw-r--r-- | admin/api/getUpdates.php | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/admin/api/getUpdates.php b/admin/api/getUpdates.php deleted file mode 100644 index 5d9c373..0000000 --- a/admin/api/getUpdates.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php
-
-header("Content-Type: application/json");
-require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
-
-exec("bash -c \"sudo mtsp-apt-get-2| grep ^Inst\"", $ret);
-$data = [];
-$data["count"] = count($ret);
-$data["packages"] = [];
-
-foreach ($ret as $package) {
- $parts = explode(" ", trim($package));
- $pkg = [
- "name" => trim($parts[1]),
- "version" => [
- "local" => trim(explode("]", explode("[", $parts[2])[1])[0]),
- "remote" => trim(explode("(", $parts[3])[1]),
- ],
- "repos" => trim(explode(":", explode("(", explode("[", trim($package))[1])[1])[1]),
- "architecture" => trim(explode("]", explode("[", trim($package))[2])[0])
- ];
-
- $data["packages"][] = $pkg;
-}
-
-echo(json_encode($data, JSON_PRETTY_PRINT));
\ No newline at end of file |