62 lines
1.8 KiB
Bash
62 lines
1.8 KiB
Bash
#!/usr/bin/env bash
|
|
source <(curl -fsSL https://git.bila.li/Proxmox/proxmox-ve-install-scripts/raw/branch/dev/misc/build.func)
|
|
# Copyright (c) 2021-2025 tteck
|
|
# Author: tteck (tteckster)
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://github.com/huntarr/huntarr
|
|
|
|
APP="Huntarr"
|
|
var_tags="${var_tags:-arr}"
|
|
var_cpu="${var_cpu:-2}"
|
|
var_ram="${var_ram:-2048}"
|
|
var_disk="${var_disk:-8}"
|
|
var_os="${var_os:-debian}"
|
|
var_version="${var_version:-12}"
|
|
var_unprivileged="${var_unprivileged:-1}"
|
|
|
|
header_info "$APP"
|
|
variables
|
|
color
|
|
catch_errors
|
|
|
|
function update_script() {
|
|
header_info
|
|
check_container_storage
|
|
check_container_resources
|
|
|
|
if [[ ! -d /var/lib/huntarr/ ]]; then
|
|
msg_error "No ${APP} Installation Found!"
|
|
exit
|
|
fi
|
|
|
|
msg_info "Updating $APP LXC"
|
|
temp_file="$(mktemp)"
|
|
rm -rf /opt/huntarr
|
|
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 "https://github.com/plexguide/Huntarr.io/archive/refs/tags/${RELEASE}.tar.gz" -o "$temp_file"
|
|
$STD mkdir -p /opt/huntarr
|
|
$STD tar -xzf "$temp_file" -C /opt/huntarr --strip-components=1
|
|
|
|
cd /opt/huntarr
|
|
$STD npm install
|
|
$STD npm run build
|
|
chmod 775 /opt/huntarr
|
|
systemctl restart huntarr
|
|
msg_ok "Updated $APP LXC"
|
|
|
|
msg_info "Cleaning up"
|
|
rm -rf "$temp_file"
|
|
$STD apt-get -y autoremove
|
|
$STD apt-get -y autoclean
|
|
msg_ok "Cleaned up"
|
|
exit
|
|
}
|
|
|
|
start
|
|
build_container
|
|
description
|
|
|
|
msg_ok "Completed Successfully!\n"
|
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" |