Skip to content

Commit

Permalink
angery
Browse files Browse the repository at this point in the history
  • Loading branch information
troglodyne committed Nov 26, 2024
1 parent 673902e commit 3403075
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions elevate-cpanel
Original file line number Diff line number Diff line change
Expand Up @@ -3073,6 +3073,12 @@ EOS
: $repos->{'jetapps-beta'} ? 'jetapps-beta'
: 'jetapps-stable'; # Just give up and choose stable if you can't guess.
INFO("Jetbackup tier '$jetbackup_tier' detected. Not removing jetbackup. Will re-install it after elevate.");
if ( ref Elevate::PkgMgr::instance() eq 'Elevate::PkgMgr::APT' ) {

if ( -f "/etc/apt/sources.list.d/$jetbackup_tier.disabled" ) {
rename( "/etc/apt/sources.list.d/$jetbackup_tier.disabled", "/etc/apt/sources.list.d/$jetbackup_tier" ) || WARN("Couldn't enable repository for $jetbackup_tier: $!");
}
}
my @reinstall = Elevate::PkgMgr::get_installed_pkgs_in_repo(qw/jetapps jetapps-stable jetapps-beta jetapps-edge/);
unshift @reinstall, $jetbackup_tier;

Expand Down
7 changes: 7 additions & 0 deletions lib/Elevate/Components/JetBackup.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ sub pre_distro_upgrade ($self) {
: $repos->{'jetapps-beta'} ? 'jetapps-beta'
: 'jetapps-stable'; # Just give up and choose stable if you can't guess.
INFO("Jetbackup tier '$jetbackup_tier' detected. Not removing jetbackup. Will re-install it after elevate.");
if ( ref Elevate::PkgMgr::instance() eq 'Elevate::PkgMgr::APT' ) {

# We need to enable that repo if possible and run apt update so that we can fetch the pkglist for it
if ( -f "/etc/apt/sources.list.d/$jetbackup_tier.disabled" ) {
rename( "/etc/apt/sources.list.d/$jetbackup_tier.disabled", "/etc/apt/sources.list.d/$jetbackup_tier" ) || WARN("Couldn't enable repository for $jetbackup_tier: $!");
}
}
my @reinstall = Elevate::PkgMgr::get_installed_pkgs_in_repo(qw/jetapps jetapps-stable jetapps-beta jetapps-edge/);
unshift @reinstall, $jetbackup_tier;

Expand Down

0 comments on commit 3403075

Please sign in to comment.