Update rdtclient.sh

create update path
This commit is contained in:
tteckster 2023-11-21 16:55:09 -05:00 committed by GitHub
parent 8e9ea1bd3c
commit 2e5bcd8424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 4 deletions

View File

@ -53,10 +53,16 @@ function default_settings() {
function update_script() {
header_info
if [[ ! -d /opt/rdtc/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
msg_ok "Updated $APP LXC"
msg_info "Updating $APP"
systemctl stop rdtc
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
systemctl start rdtc
msg_ok "Updated $APP"
exit
}