mirror of
https://github.com/unraid/api.git
synced 2025-12-31 21:49:57 -06:00
feat: when cancelling OS upgrade, delete any plugin files that were d… (#1823)
…ownloaded as part of the upgrade
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved cleanup of temporary plugin configuration files during update
cancellation operations.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -46,6 +46,11 @@ class UnraidUpdateCancel
|
||||
$readmeContent .= "Unraid OS by [Lime Technology, Inc.](https://lime-technology.com).\n";
|
||||
file_put_contents($readmeFile, $readmeContent);
|
||||
|
||||
// Delete plugin files that were downloaded during the OS upgrade
|
||||
if (is_dir("/boot/config/plugins-nextboot")) {
|
||||
shell_exec("rm -rf /boot/config/plugins-nextboot");
|
||||
}
|
||||
|
||||
return ['success' => true]; // Upgrade handled successfully
|
||||
} catch (\Throwable $th) {
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user