aboutsummaryrefslogtreecommitdiff
path: root/utils/ng/upload.php
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2022-10-25 23:42:28 +0800
committerKunoiSayami <[email protected]>2022-10-25 23:42:28 +0800
commitd759f60c944b70f10a90912e01c2f038c10e525d (patch)
tree274112b09ea137d9bb056ecbbc2189b3735528e1 /utils/ng/upload.php
parent125ebfac956440f3a26e160a02d0c54c402a7bca (diff)
feat(script): Implement systemd functions
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'utils/ng/upload.php')
-rw-r--r--utils/ng/upload.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/utils/ng/upload.php b/utils/ng/upload.php
index fc60a61..da848eb 100644
--- a/utils/ng/upload.php
+++ b/utils/ng/upload.php
@@ -14,16 +14,13 @@
if (move_uploaded_file($_FILES['file']['tmp_name'], $path)) {
echo "The file " . basename( $_FILES['file']['name']) . " has been uploaded";
- $sock = stream_socket_client('unix:///run/update-repo-notify.sock', $errno, $errst);
- fwrite($sock, $['file']['name']."\r\n");
- fclose($sock);
} else {
echo "There was an error uploading the file, please try again!";
}
} else if (isset($_POST['action'])) {
if ($_POST['action'] === 'UPLOADED') {
$sock = stream_socket_client('unix:///run/update-repo-notify.sock', $errno, $errst);
- fwrite($sock, "EOF\r\n");
+ fwrite($sock, "ARCH=". $_POST['arch'] ."\r\n");
fclose($sock);
echo "200 OK STARTED";
} else if ($_POST['action'] === 'REQUIRE_CLEAN') {