Refactor: Recyclarr (#7085)

* Refactor

* Update recyclarr.sh
This commit is contained in:
Slaviša Arežina
2025-08-22 14:59:11 +02:00
committed by GitHub
parent 73178f5ff4
commit a74b7c4763
2 changed files with 20 additions and 20 deletions

View File

@@ -20,22 +20,23 @@ color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /root/.config/recyclarr/recyclarr.yml ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating ${APP}"
curl -fsSL "$(curl -fsSL https://api.github.com/repos/recyclarr/recyclarr/releases/latest | grep download | grep linux-x64 | cut -d\" -f4)" -o $(basename "$(curl -fsSL https://api.github.com/repos/recyclarr/recyclarr/releases/latest | grep download | grep linux-x64 | cut -d\" -f4)")
tar -C /usr/local/bin -xJf recyclarr*.tar.xz
rm -rf recyclarr*.tar.xz
msg_ok "Updated ${APP}"
msg_ok "Updated Successfully"
header_info
check_container_storage
check_container_resources
if [[ ! -f /root/.config/recyclarr/recyclarr.yml ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/recyclarr/recyclarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ "${RELEASE}" != "$(cat ~/.recyclarr 2>/dev/null)" ]] || [[ ! -f ~/.recyclarr ]]; then
fetch_and_deploy_gh_release "recyclarr" "recyclarr/recyclarr" "prebuild" "latest" "/usr/local/bin" "recyclarr-linux-x64.tar.xz"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
exit
}
start

View File

@@ -17,18 +17,17 @@ msg_info "Installing Dependencies"
$STD apt-get install -y git
msg_ok "Installed Dependencies"
msg_info "Installing Recyclarr"
curl -fsSL "$(curl -fsSL https://api.github.com/repos/recyclarr/recyclarr/releases/latest | grep download | grep linux-x64 | cut -d\" -f4)" -o $(basename "$(curl -fsSL https://api.github.com/repos/recyclarr/recyclarr/releases/latest | grep download | grep linux-x64 | cut -d\" -f4)")
tar -C /usr/local/bin -xJf recyclarr*.tar.xz
fetch_and_deploy_gh_release "recyclarr" "recyclarr/recyclarr" "prebuild" "latest" "/usr/local/bin" "recyclarr-linux-x64.tar.xz"
msg_info "Configuring Recyclarr"
mkdir -p /root/.config/recyclarr
recyclarr config create
msg_ok "Installed Recyclarr"
msg_ok "Configured Recyclarr"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf recyclarr*.tar.xz
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"