Refactor: Tdarr (#6969)

This commit is contained in:
CanbiZ
2025-08-19 21:55:42 +02:00
committed by GitHub
parent 615049ce5c
commit be6cc7ddbb
3 changed files with 47 additions and 41 deletions

View File

@ -20,18 +20,30 @@ color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/tdarr ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating $APP LXC"
$STD apt-get update
$STD apt-get -y upgrade
msg_ok "Updated $APP LXC"
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/tdarr ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating $APP LXC"
$STD apt-get update
$STD apt-get -y upgrade
rm -rf /opt/tdarr/Tdarr_Updater
cd /opt/tdarr
RELEASE=$(curl -fsSL https://f000.backblazeb2.com/file/tdarrs/versions.json | grep -oP '(?<="Tdarr_Updater": ")[^"]+' | grep linux_x64 | head -n 1)
curl -fsSL "$RELEASE" -o Tdarr_Updater.zip
$STD unzip Tdarr_Updater.zip
chmod +x Tdarr_Updater
$STD ./Tdarr_Updater
msg_ok "Updated $APP LXC"
msg_info "Cleaning up"
rm -rf /opt/tdarr/Tdarr_Updater.zip
msg_ok "Cleaned"
msg_ok "$APP has been successfully updated!"
exit
}
start
@ -41,4 +53,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8265${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8265${CL}"