fix git urls
This commit is contained in:
@ -5,6 +5,7 @@ source <(curl -fsSL https://git.bila.li/Proxmox/proxmox-ve-install-scripts/raw/b
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: [SOURCE_URL]
|
||||
|
||||
# App Default Values
|
||||
APP="huntarr"
|
||||
var_tags="${var_tags:-arr}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
@ -31,10 +32,7 @@ function update_script() {
|
||||
fi
|
||||
|
||||
# Crawling the new version and checking whether an update is required
|
||||
LATEST_JSON=$(curl -fsSL https://api.github.com/repos/plexguide/Huntarr.io/releases/latest)
|
||||
RELEASE=$(echo "$LATEST_JSON" | grep '"tag_name":' | head -1 | cut -d '"' -f4)
|
||||
DOWNLOAD_URL=$(echo "$LATEST_JSON" | grep 'browser_download_url' | grep linux_amd64.tar.gz | cut -d '"' -f4)
|
||||
TAR_FILE=$(basename "$DOWNLOAD_URL")
|
||||
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/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
# Stopping Services
|
||||
msg_info "Stopping $APP"
|
||||
@ -48,9 +46,9 @@ function update_script() {
|
||||
|
||||
# Execute Update
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
curl -fsSL -o "/opt/${APP}/${TAR_FILE}" "$DOWNLOAD_URL"
|
||||
tar -xzf "/opt/${APP}/${TAR_FILE}" -C /opt/${APP}
|
||||
chmod +x /opt/${APP}/${APP}
|
||||
curl -fsSL -o "/opt/huntarr/huntarr_${RELEASE}_linux_amd64.tar.gz" "https://github.com/plexguide/Huntarr.io/releases/download/${RELEASE}/huntarr_${RELEASE}_linux_amd64.tar.gz"
|
||||
tar -xzf "/opt/huntarr/huntarr_${RELEASE}_linux_amd64.tar.gz" -C /opt/huntarr
|
||||
chmod +x /opt/huntarr/huntarr
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
|
||||
# Starting Services
|
||||
@ -60,7 +58,7 @@ function update_script() {
|
||||
|
||||
# Cleaning up
|
||||
msg_info "Cleaning Up"
|
||||
rm -f "/opt/${APP}/${TAR_FILE}"
|
||||
rm -f /opt/huntarr/huntarr_"${RELEASE}"_linux_amd64.tar.gz
|
||||
msg_ok "Cleanup Completed"
|
||||
|
||||
# Last Action
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SPINNER_PID=0
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: [YourUserName]
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
@ -29,18 +27,11 @@ msg_ok "Installed Dependencies"
|
||||
|
||||
# Setup App
|
||||
msg_info "Setup ${APPLICATION}"
|
||||
LATEST_JSON=$(curl -fsSL https://api.github.com/repos/plexguide/Huntarr.io/releases/latest)
|
||||
RELEASE=$(echo "$LATEST_JSON" | jq -r '.tag_name')
|
||||
DOWNLOAD_URL=$(echo "$LATEST_JSON" | jq -r '.assets[] | select(.name | test("linux_amd64\\.tar\\.gz")) | .browser_download_url')
|
||||
if [[ -z "$DOWNLOAD_URL" ]]; then
|
||||
msg_error "Failed to parse download URL"
|
||||
exit 1
|
||||
fi
|
||||
TAR_FILE=$(basename "$DOWNLOAD_URL")
|
||||
mkdir -p /opt/${APPLICATION}
|
||||
curl -fsSL -o "/opt/${APPLICATION}/${TAR_FILE}" "$DOWNLOAD_URL"
|
||||
tar -xzf "/opt/${APPLICATION}/${TAR_FILE}" -C /opt/${APPLICATION}
|
||||
chmod +x /opt/${APPLICATION}/${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 "${APPLICATION}-${RELEASE}/" "/opt/${APPLICATION}"
|
||||
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Setup ${APPLICATION}"
|
||||
|
||||
@ -52,7 +43,7 @@ Description=${APPLICATION} Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Environment=TZ=America/New_York
|
||||
Environment=TZ=Europe/Zurich
|
||||
ExecStart=/opt/${APPLICATION}/${APPLICATION} --config /opt/${APPLICATION} --port 9705
|
||||
Restart=always
|
||||
|
||||
|
||||
Reference in New Issue
Block a user