linkpi_firmware_history/rootfs/link/web/upcfg.php

16 lines
497 B
PHP
Raw Normal View History

2024-02-15 22:07:30 +01:00
<?php
$response = array();
2024-02-15 22:07:33 +01:00
if(move_uploaded_file($_FILES['file']['tmp_name'], "/link/update/configs.zip")) {
2024-02-15 22:07:30 +01:00
$response['isSuccess'] = true;
2024-02-15 22:07:33 +01:00
exec("unzip -o /link/update/configs.zip -d /link/config/");
exec("rm -f /link/update/configs.zip");
exec("/link/shell/tzone.sh");
if(file_exists("/link/config/auto/root.cron"))
exec("cp -a /link/config/auto/root.cron /var/spool/cron/crontabs/root");
2024-02-15 22:07:30 +01:00
}else{
$response['isSuccess'] = false;
}
echo json_encode($response);
2024-02-15 22:07:33 +01:00
?>