aboutsummaryrefslogtreecommitdiff
path: root/admin/api
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-09 15:39:56 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-09 15:39:56 +0200
commitbdb80424adb6a3d0b37285f817118592f4e21b18 (patch)
treef447005becd79b0d2c1e5dee557428f9a66772eb /admin/api
parent94c57fa247ba107fce8fc1d1fc355191229dbddc (diff)
downloadmain-bdb80424adb6a3d0b37285f817118592f4e21b18.tar.gz
main-bdb80424adb6a3d0b37285f817118592f4e21b18.tar.bz2
main-bdb80424adb6a3d0b37285f817118592f4e21b18.zip
Securing the security
Diffstat (limited to 'admin/api')
-rw-r--r--admin/api/getUbuntuUpgrades.php2
-rw-r--r--admin/api/getUpdates.php2
-rw-r--r--admin/api/refreshUpdates.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/admin/api/getUbuntuUpgrades.php b/admin/api/getUbuntuUpgrades.php
index 8273036..ca49f38 100644
--- a/admin/api/getUbuntuUpgrades.php
+++ b/admin/api/getUbuntuUpgrades.php
@@ -2,7 +2,7 @@
require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
-exec("bash -c \"sudo do-release-upgrade -c | grep 'New release'\"", $ret);
+exec("bash -c \"sudo mtsp-do-release-upgrade | grep 'New release'\"", $ret);
if (count($ret) === 1) {
echo(l("<b>Ubuntu " . explode("'", $ret[0])[1] . "</b> is available, use <code>do-release-upgrade</code> to upgrade", "<b>Ubuntu " . explode("'", $ret[0])[1] . "</b> est disponible, exécutez la commande <code>do-release-upgrade</code> pour effectuer la mise à niveau"));
} else {
diff --git a/admin/api/getUpdates.php b/admin/api/getUpdates.php
index 099dd67..5d9c373 100644
--- a/admin/api/getUpdates.php
+++ b/admin/api/getUpdates.php
@@ -3,7 +3,7 @@
header("Content-Type: application/json");
require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
-exec("bash -c \"sudo apt-get upgrade -s| grep ^Inst\"", $ret);
+exec("bash -c \"sudo mtsp-apt-get-2| grep ^Inst\"", $ret);
$data = [];
$data["count"] = count($ret);
$data["packages"] = [];
diff --git a/admin/api/refreshUpdates.php b/admin/api/refreshUpdates.php
index 39ac9ed..ec4c707 100644
--- a/admin/api/refreshUpdates.php
+++ b/admin/api/refreshUpdates.php
@@ -1,4 +1,4 @@
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
-exec("bash -c \"sudo apt-get update", $ret); \ No newline at end of file
+exec("bash -c \"sudo mtsp-apt-get-1", $ret); \ No newline at end of file