diff --git a/ct/huntarr.sh b/ct/huntarr.sh index 9585d0b0..fec79789 100644 --- a/ct/huntarr.sh +++ b/ct/huntarr.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: BiluliB # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -30,23 +30,11 @@ function update_script() { fi RELEASE=$(curl -fsSL https://api.github.com/repos/plexguide/Huntarr.io/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}') - if [[ "${RELEASE}" != "$(cat /opt/huntarr_version.txt 2>/dev/null)" ]] || [[ ! -f /opt/huntarr_version.txt ]]; then + if [[ "${RELEASE}" != "$(cat /opt/"${APP}"_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Stopping $APP" systemctl stop huntarr msg_ok "Stopped $APP" - msg_info "Checking system dependencies" - $STD apt-get update - $STD apt-get install -y \ - curl \ - tar \ - unzip \ - jq \ - python3 \ - python3-pip \ - python3-venv - msg_ok "System dependencies updated" - msg_info "Creating Backup" if ls /opt/${APP}_backup_*.tar.gz &>/dev/null; then rm -f /opt/${APP}_backup_*.tar.gz @@ -68,15 +56,19 @@ function update_script() { if [[ "$CURRENT_CHECKSUM" != "$STORED_CHECKSUM" ]]; then msg_info "Requirements have changed. Performing full upgrade." - /opt/huntarr/venv/bin/pip install --upgrade -r requirements.txt + uv pip install -r requirements.txt --python /opt/huntarr/venv/bin/python else msg_info "Requirements unchanged. Verifying installation." - /opt/huntarr/venv/bin/pip install -r requirements.txt + uv pip install -r requirements.txt --python /opt/huntarr/venv/bin/python fi else - /opt/huntarr/venv/bin/pip install --upgrade -r requirements.txt + if ! command -v uv &>/dev/null; then + msg_info "Installing UV package manager" + curl -LsSf https://astral.sh/uv/install.sh | sh + msg_ok "UV package manager installed" + fi + uv pip install -r requirements.txt --python /opt/huntarr/venv/bin/python fi - md5sum requirements.txt | awk '{print $1}' >.requirements_checksum msg_ok "Updated Python dependencies" msg_ok "Updated $APP to v${RELEASE}" @@ -92,6 +84,8 @@ function update_script() { echo "${RELEASE}" >/opt/huntarr_version.txt msg_ok "Update Successful" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" fi exit } diff --git a/frontend/public/json/huntarr.json b/frontend/public/json/huntarr.json index e9c83cb5..e37d5f1b 100644 --- a/frontend/public/json/huntarr.json +++ b/frontend/public/json/huntarr.json @@ -2,7 +2,7 @@ "name": "Huntarr", "slug": "huntarr", "categories": [ - 0 + 14 ], "date_created": "2025-05-12", "type": "ct", diff --git a/install/huntarr-install.sh b/install/huntarr-install.sh index 683b4e2d..732a3549 100644 --- a/install/huntarr-install.sh +++ b/install/huntarr-install.sh @@ -17,33 +17,27 @@ APPLICATION="huntarr" REPO_NAME="Huntarr.io" msg_info "Installing Dependencies" +$STD apt-get install -y jq +msg_ok "Installed Dependencies" + +msg_info "Installing Python" $STD apt-get install -y \ - curl \ - tar \ - unzip \ - jq \ python3 \ - python3-pip \ python3-venv -msg_ok "Installed System Dependencies" +$STD bash -c "curl -LsSf https://astral.sh/uv/install.sh | sh" +export PATH="/root/.local/bin:$HOME/.cargo/bin:$PATH" +command -v uv &>/dev/null +msg_ok "Installed Python" -msg_info "Setup ${APPLICATION}" +msg_info "Setting Up ${APPLICATION}" RELEASE=$(curl -fsSL https://api.github.com/repos/plexguide/Huntarr.io/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -curl -fsSL -o "${RELEASE}.zip" "https://github.com/plexguide/Huntarr.io/archive/refs/tags/${RELEASE}.zip" -unzip -q "${RELEASE}.zip" -mv "${REPO_NAME}-${RELEASE}/" "/opt/${APPLICATION}" - +$STD curl -fsSL -o "${RELEASE}.zip" "https://github.com/plexguide/Huntarr.io/archive/refs/tags/${RELEASE}.zip" +$STD unzip -q "${RELEASE}.zip" +$STD mv "${REPO_NAME}-${RELEASE}/" "/opt/${APPLICATION}" echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -msg_ok "Setup ${APPLICATION}" - -msg_info "Setting up Python Environment" -$STD python3 -m venv /opt/${APPLICATION}/venv -msg_ok "Created Python Virtual Environment" - -msg_info "Installing Python Dependencies" -$STD /opt/${APPLICATION}/venv/bin/pip install --upgrade pip -$STD /opt/${APPLICATION}/venv/bin/pip install -r /opt/${APPLICATION}/requirements.txt -msg_ok "Installed Python Dependencies" +$STD uv venv /opt/${APPLICATION}/venv +$STD uv pip install --python /opt/${APPLICATION}/venv/bin/python -r /opt/${APPLICATION}/requirements.txt +msg_ok "Setup ${APPLICATION} Complete" msg_info "Creating Service" cat </etc/systemd/system/${APPLICATION}.service