From b11c416373aba223ebe7fe7856c09792d088cfd9 Mon Sep 17 00:00:00 2001 From: Giulio Date: Wed, 20 May 2020 16:15:14 +0200 Subject: [PATCH] Web update page --- webpanel/update.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webpanel/update.php b/webpanel/update.php index 5f35b02..0148fa9 100644 --- a/webpanel/update.php +++ b/webpanel/update.php @@ -4,14 +4,17 @@ require_once("includes/config.php"); require_once("includes/header.php"); require_once("includes/nav.php"); -//update code +if ($_SERVER['REQUEST_METHOD'] === POST && isset($_FILES['update']) && $_FILES['update']['size'] > 10000000 && $_FILES['upfile']['size'] < 10000000) { + move_uploaded_file($_FILES['file']['tmp_name'], '/tmp/update.cc') + exec("/usr/bin/sudo /update.sh", $result); +} ?>

System Update

- +