create huntar install script
This commit is contained in:
58
install/huntarr-install.sh
Normal file
58
install/huntarr-install.sh
Normal file
@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 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
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$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_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
Reference in New Issue
Block a user