Improve Downgrade process

This commit is contained in:
ljm42
2023-09-19 16:49:03 -07:00
parent 44817e1049
commit e842121c3b
2 changed files with 5 additions and 0 deletions
@@ -20,6 +20,9 @@ require_once "$docroot/webGui/include/Secure.php";
$_SERVER['REQUEST_URI'] = 'plugins';
require_once "$docroot/webGui/include/Translations.php";
$tmpdir="/boot/deletemedowngrade.".uniqid();
mkdir($tmpdir);
exec("mv -f /boot/bz* $tmpdir");
exec("mv -f /boot/previous/* /boot");
$version = unscript(_var($_GET,'version'));
file_put_contents("$docroot/plugins/unRAIDServer/README.md","**"._('DOWNGRADE TO VERSION')." $version**");