This commit is contained in:
Slaviša Arežina 2025-08-23 10:26:04 +02:00 committed by GitHub
parent 88579d4be3
commit 1fce2de5c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 23 deletions

View file

@ -23,25 +23,21 @@ function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var/lib/prowlarr/ ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating $APP LXC"
temp_file="$(mktemp)"
rm -rf /opt/Prowlarr
RELEASE=$(curl -fsSL https://api.github.com/repos/Prowlarr/Prowlarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
curl -fsSL "https://github.com/Prowlarr/Prowlarr/releases/download/v${RELEASE}/Prowlarr.master.${RELEASE}.linux-core-x64.tar.gz" -o "$temp_file"
$STD tar -xvzf "$temp_file"
mv Prowlarr /opt
chmod 775 /opt/Prowlarr
msg_ok "Updated $APP LXC"
if [[ "${RELEASE}" != "$(cat ~/.prowlarr 2>/dev/null)" ]] || [[ ! -f ~/.prowlarr ]]; then
rm -rf /opt/Prowlarr
fetch_and_deploy_gh_release "prowlarr" "Prowlarr/Prowlarr" "prebuild" "latest" "/opt/Prowlarr" "Prowlarr.master*linux-core-x64.tar.gz"
chmod 775 /opt/Prowlarr
msg_ok "Successfully updated"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
msg_info "Cleaning up"
rm -f "$temp_file"
msg_ok "Cleaned up"
exit
}