#!/usr/bin/env bash # Copyright (c) 2021-2025 community-scripts ORG # Author: [YourUserName] # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/plexguide/Huntarr.io # Import Functions und Setup source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors setting_up_container network_check update_os # Installing Dependencies msg_info "Installing Dependencies" $STD apt-get install -y \ curl \ tar \ unzip msg_ok "Installed 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)}') mkdir -p /opt/${APPLICATION} curl -fsSL -o "/opt/${APPLICATION}/${APPLICATION}_${RELEASE}_linux_amd64.tar.gz" "https://github.com/plexguide/Huntarr.io/releases/download/${RELEASE}/${APPLICATION}_${RELEASE}_linux_amd64.tar.gz" tar -xzf "/opt/${APPLICATION}/${APPLICATION}_${RELEASE}_linux_amd64.tar.gz" -C /opt/${APPLICATION} chmod +x /opt/${APPLICATION}/${APPLICATION} echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Setup ${APPLICATION}" # Creating Service (if needed) msg_info "Creating Service" cat </etc/systemd/system/${APPLICATION}.service [Unit] Description=${APPLICATION} Service After=network.target [Service] Environment=TZ=America/New_York ExecStart=/opt/${APPLICATION}/${APPLICATION} --config /opt/${APPLICATION} --port 9705 Restart=always [Install] WantedBy=multi-user.target EOF systemctl enable -q --now ${APPLICATION} msg_ok "Created Service" motd_ssh customize # Cleanup msg_info "Cleaning up" rm -f ${RELEASE}.zip $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned"