fix huntarr-install naming issues
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
Huntarr.io-6.3.6/
|
||||||
@ -6,7 +6,7 @@ source <(curl -fsSL https://git.bila.li/Proxmox/proxmox-ve-install-scripts/raw/b
|
|||||||
# Source: [SOURCE_URL]
|
# Source: [SOURCE_URL]
|
||||||
|
|
||||||
# App Default Values
|
# App Default Values
|
||||||
APP="huntarr"
|
APP="Huntarr"
|
||||||
var_tags="${var_tags:-arr}"
|
var_tags="${var_tags:-arr}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-1024}"
|
var_ram="${var_ram:-1024}"
|
||||||
|
|||||||
@ -15,6 +15,7 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
APPLICATION="huntarr"
|
APPLICATION="huntarr"
|
||||||
|
REPO_NAME="Huntarr.io"
|
||||||
|
|
||||||
# Installing Dependencies
|
# Installing Dependencies
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
@ -22,29 +23,44 @@ $STD apt-get install -y \
|
|||||||
curl \
|
curl \
|
||||||
tar \
|
tar \
|
||||||
unzip \
|
unzip \
|
||||||
jq
|
jq \
|
||||||
msg_ok "Installed Dependencies"
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
python3-venv
|
||||||
|
msg_ok "Installed System Dependencies"
|
||||||
|
|
||||||
# Setup App
|
# Setup App
|
||||||
msg_info "Setup ${APPLICATION}"
|
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) }')
|
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"
|
curl -fsSL -o "${RELEASE}.zip" "https://github.com/plexguide/Huntarr.io/archive/refs/tags/${RELEASE}.zip"
|
||||||
unzip -q "${RELEASE}.zip"
|
unzip -q "${RELEASE}.zip"
|
||||||
mv "${APPLICATION}-${RELEASE}/" "/opt/${APPLICATION}"
|
mv "${REPO_NAME}-${RELEASE}/" "/opt/${APPLICATION}"
|
||||||
|
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
msg_ok "Setup ${APPLICATION}"
|
msg_ok "Setup ${APPLICATION}"
|
||||||
|
|
||||||
|
# Setup Python Environment
|
||||||
|
msg_info "Setting up Python Environment"
|
||||||
|
$STD python3 -m venv /opt/${APPLICATION}/venv
|
||||||
|
msg_ok "Created Python Virtual Environment"
|
||||||
|
|
||||||
|
# Install Python Dependencies
|
||||||
|
msg_info "Installing Python Dependencies"
|
||||||
|
$STD /opt/${APPLICATION}/venv/bin/pip install --upgrade pip
|
||||||
|
$STD /opt/${APPLICATION}/venv/bin/pip install -r /opt/${APPLICATION}/requirements.txt
|
||||||
|
msg_ok "Installed Python Dependencies"
|
||||||
|
|
||||||
# Creating Service (if needed)
|
# Creating Service (if needed)
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
|
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=${APPLICATION} Service
|
Description=Huntarr Service
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment=TZ=Europe/Zurich
|
Environment=TZ=Europe/Zurich
|
||||||
ExecStart=/opt/${APPLICATION}/${APPLICATION} --config /opt/${APPLICATION} --port 9705
|
WorkingDirectory=/opt/${APPLICATION}
|
||||||
|
ExecStart=/opt/${APPLICATION}/venv/bin/python /opt/${APPLICATION}/main.py
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
@ -58,7 +74,7 @@ customize
|
|||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -f "/opt/${APPLICATION}/${TAR_FILE}"
|
rm -f "${RELEASE}.zip"
|
||||||
$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"
|
||||||
|
|||||||
Reference in New Issue
Block a user