diff --git a/ct/rdtclient.sh b/ct/rdtclient.sh index d36538e6..8c6fab32 100755 --- a/ct/rdtclient.sh +++ b/ct/rdtclient.sh @@ -54,17 +54,33 @@ function default_settings() { function update_script() { header_info +check_container_storage +check_container_resources if [[ ! -d /opt/rdtc/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_info "Updating $APP" +msg_info "Stopping ${APP}" systemctl stop rdtc +msg_ok "Stopped ${APP}" + +msg_info "Updating ${APP}" +if dpkg-query -W dotnet-sdk-8.0 >/dev/null 2>&1; then + apt-get remove --purge -y dotnet-sdk-8.0 &>/dev/null + apt-get install -y dotnet-sdk-9.0 &>/dev/null +fi mkdir -p rdtc-backup cp -R /opt/rdtc/appsettings.json rdtc-backup/ wget -q https://github.com/rogerfar/rdt-client/releases/latest/download/RealDebridClient.zip unzip -oqq RealDebridClient.zip -d /opt/rdtc cp -R rdtc-backup/appsettings.json /opt/rdtc/ -rm -rf rdtc-backup RealDebridClient.zip +msg_ok "Updated ${APP}" + +msg_info "Starting ${APP}" systemctl start rdtc -msg_ok "Updated $APP" +msg_ok "Started ${APP}" + +msg_info "Cleaning Up" +rm -rf rdtc-backup RealDebridClient.zip +msg_ok "Cleaned" +msg_ok "Updated Successfully" exit } diff --git a/install/rdtclient-install.sh b/install/rdtclient-install.sh index 58fcc556..d48d0848 100644 --- a/install/rdtclient-install.sh +++ b/install/rdtclient-install.sh @@ -14,10 +14,10 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y unzip +$STD apt-get install -y \ + mc \ + curl \ + sudo msg_ok "Installed Dependencies" msg_info "Installing ASP.NET Core Runtime" @@ -25,7 +25,7 @@ wget -q https://packages.microsoft.com/config/debian/12/packages-microsoft-prod. $STD dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb $STD apt-get update -$STD apt-get install -y dotnet-sdk-8.0 +$STD apt-get install -y dotnet-sdk-9.0 msg_ok "Installed ASP.NET Core Runtime" msg_info "Installing rdtclient"