fix huntarr git urls
This commit is contained in:
@ -30,16 +30,22 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Updating $APP LXC"
|
msg_info "Updating $APP LXC"
|
||||||
|
temp_file="$(mktemp)"
|
||||||
|
rm -rf /opt/huntarr
|
||||||
|
RELEASE=$(curl -fsSL https://api.github.com/repos/huntarr/huntarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
curl -fsSL "https://github.com/huntarr/huntarr/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
|
cd /opt/huntarr
|
||||||
HUNTARR_VERSION="${HUNTARR_VERSION:-6.2}"
|
|
||||||
$STD git fetch --all
|
|
||||||
$STD git checkout "v${HUNTARR_VERSION}"
|
|
||||||
$STD npm install
|
$STD npm install
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
|
chmod 775 /opt/huntarr
|
||||||
systemctl restart huntarr
|
systemctl restart huntarr
|
||||||
msg_ok "Updated $APP LXC"
|
msg_ok "Updated $APP LXC"
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
|
rm -rf "$temp_file"
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned up"
|
msg_ok "Cleaned up"
|
||||||
@ -50,47 +56,7 @@ start
|
|||||||
build_container
|
build_container
|
||||||
description
|
description
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apt-get update
|
|
||||||
$STD apt-get install -y curl wget gnupg git openjdk-17-jdk nodejs npm
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing Huntarr"
|
|
||||||
mkdir -p /var/lib/huntarr/
|
|
||||||
chmod 775 /var/lib/huntarr/
|
|
||||||
$STD git clone https://github.com/huntarr/huntarr.git /opt/huntarr
|
|
||||||
cd /opt/huntarr
|
|
||||||
HUNTARR_VERSION="${HUNTARR_VERSION:-6.2}"
|
|
||||||
$STD git checkout "v${HUNTARR_VERSION}"
|
|
||||||
$STD npm install
|
|
||||||
$STD npm run build
|
|
||||||
msg_ok "Installed Huntarr"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
cat <<EOF >/etc/systemd/system/huntarr.service
|
|
||||||
[Unit]
|
|
||||||
Description=Huntarr Service
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
UMask=0002
|
|
||||||
Type=simple
|
|
||||||
WorkingDirectory=/opt/huntarr
|
|
||||||
ExecStart=/usr/bin/npm start
|
|
||||||
Restart=on-failure
|
|
||||||
TimeoutStopSec=20
|
|
||||||
KillMode=process
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now huntarr
|
|
||||||
msg_ok "Created Service"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${INFO}${GN} http://${BL}$(hostname)${GN}:3000${CL}\n"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||||
@ -13,22 +13,22 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
APP="Huntarr"
|
|
||||||
HUNTARR_PORT="3000"
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y curl wget gnupg git openjdk-17-jdk nodejs npm
|
$STD apt-get install -y curl wget gnupg git openjdk-17-jdk nodejs npm
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Huntarr"
|
msg_info "Installing Huntarr"
|
||||||
|
temp_file="$(mktemp)"
|
||||||
mkdir -p /var/lib/huntarr/
|
mkdir -p /var/lib/huntarr/
|
||||||
chmod 775 /var/lib/huntarr/
|
chmod 775 /var/lib/huntarr/
|
||||||
$STD git clone https://github.com/huntarr/huntarr.git /opt/huntarr
|
RELEASE=$(curl -fsSL https://api.github.com/repos/huntarr/huntarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
curl -fsSL "https://github.com/huntarr/huntarr/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
|
cd /opt/huntarr
|
||||||
HUNTARR_VERSION="${HUNTARR_VERSION:-6.2}"
|
|
||||||
$STD git checkout "v${HUNTARR_VERSION}"
|
|
||||||
$STD npm install
|
$STD npm install
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
|
chmod 775 /opt/huntarr
|
||||||
msg_ok "Installed Huntarr"
|
msg_ok "Installed Huntarr"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
@ -36,7 +36,6 @@ cat <<EOF >/etc/systemd/system/huntarr.service
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Huntarr Service
|
Description=Huntarr Service
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
UMask=0002
|
UMask=0002
|
||||||
Type=simple
|
Type=simple
|
||||||
@ -45,7 +44,6 @@ ExecStart=/usr/bin/npm start
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=20
|
TimeoutStopSec=20
|
||||||
KillMode=process
|
KillMode=process
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
@ -56,9 +54,7 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
|
rm -rf "$temp_file"
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
|
||||||
echo -e "\n${APP} installation completed successfully!"
|
|
||||||
echo -e "\nYou can access the ${APP} web interface at http://${HOSTNAME}:${HUNTARR_PORT}"
|
|
||||||
Reference in New Issue
Block a user