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

View File

@@ -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**");

View File

@@ -38,3 +38,5 @@ mkdir -p "$CFG_NEW"
# stating with 6.10 'USE_SSL="auto"' without a LE cert is invalid
[[ ! -f /boot/config/ssl/certs/certificate_bundle.pem ]] && sed -i s/USE_SSL=\"auto\"/USE_SSL=\"no\"/ /boot/config/ident.cfg
# delete any temp dir left over from a version downgrade (see dynamix.plugin.manager/include/Downgrade.php)
rm -rf /boot/deletemedowngrade.*