fix huntart-install update part

This commit is contained in:
12e70ig
2025-05-09 22:40:31 +02:00
parent b1edeec8c7
commit db175d6584
2 changed files with 17 additions and 18 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: [YourUserName]
# Author: BiluliB
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/plexguide/Huntarr.io
@ -17,7 +17,6 @@ update_os
APPLICATION="huntarr"
REPO_NAME="Huntarr.io"
# Installing Dependencies
msg_info "Installing Dependencies"
$STD apt-get install -y \
curl \
@ -29,7 +28,6 @@ $STD apt-get install -y \
python3-venv
msg_ok "Installed System Dependencies"
# Setup App
msg_info "Setup ${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"
@ -39,18 +37,15 @@ mv "${REPO_NAME}-${RELEASE}/" "/opt/${APPLICATION}"
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Setup ${APPLICATION}"
# Setup Python Environment
msg_info "Setting up Python Environment"
$STD python3 -m venv /opt/${APPLICATION}/venv
msg_ok "Created Python Virtual Environment"
# Install Python Dependencies
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"
# Creating Service (if needed)
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
[Unit]
@ -72,7 +67,6 @@ msg_ok "Created Service"
motd_ssh
customize
# Cleanup
msg_info "Cleaning up"
rm -f "${RELEASE}.zip"
$STD apt-get -y autoremove