fixed both sh files
This commit is contained in:
33
README.md
33
README.md
@ -1,10 +1,3 @@
|
|||||||
# proxmox-ve-install-scripts
|
|
||||||
|
|
||||||
huntarr:
|
|
||||||
`bash -c "$(curl -fsSL https://git.bila.li/Proxmox/proxmox-ve-install-scripts/raw/branch/dev/ct/huntarr.sh)"`
|
|
||||||
|
|
||||||
# Proxmox VE Install Scripts
|
|
||||||
|
|
||||||
A collection of installation scripts for Proxmox VE containers.
|
A collection of installation scripts for Proxmox VE containers.
|
||||||
|
|
||||||
## Installation Commands
|
## Installation Commands
|
||||||
@ -17,28 +10,10 @@ Create a new Huntarr LXC container:
|
|||||||
bash -c "$(curl -fsSL https://git.bila.li/Proxmox/proxmox-ve-install-scripts/raw/branch/dev/ct/huntarr.sh)"
|
bash -c "$(curl -fsSL https://git.bila.li/Proxmox/proxmox-ve-install-scripts/raw/branch/dev/ct/huntarr.sh)"
|
||||||
```
|
```
|
||||||
|
|
||||||
Install Huntarr in an existing container:
|
### Profilarr
|
||||||
|
|
||||||
|
Create a new Profilarr LXC container:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash -c "$(curl -fsSL https://git.bila.li/Proxmox/proxmox-ve-install-scripts/raw/branch/dev/install/huntarr-install.sh)"
|
bash -c "$(curl -fsSL https://git.bila.li/Proxmox/proxmox-ve-install-scripts/raw/branch/dev/ct/profilarr.sh)"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Custom Options
|
|
||||||
|
|
||||||
You can customize the LXC creation with environment variables:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
var_cpu=4 var_ram=4096 var_disk=16 HUNTARR_VERSION=6.2 bash -c "$(curl -fsSL https://git.bila.li/Proxmox/proxmox-ve-install-scripts/raw/branch/dev/lxc/huntarr.sh)"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Available Options:
|
|
||||||
|
|
||||||
- var_cpu: Number of CPU cores
|
|
||||||
- var_ram: RAM in MB
|
|
||||||
- var_disk: Disk size in GB
|
|
||||||
- var_os: Operating system (debian, ubuntu)
|
|
||||||
- var_version: OS version (12, 11, 22.04, etc.)
|
|
||||||
- HUNTARR_VERSION: Version of Huntarr to install
|
|
||||||
|
|
||||||
Tag creator:
|
|
||||||
https://patorjk.com/software/taag/#p=display&f=Slant&t=Huntarr
|
|
||||||
|
|||||||
160
ct/profilarr.sh
160
ct/profilarr.sh
@ -1,104 +1,96 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: GitHub Copilot
|
# Author: GitHub Copilot
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://github.com/Dictionarry-Hub/profilarr
|
# Source: https://github.com/Dictionarry-Hub/profilarr
|
||||||
|
|
||||||
# Import Functions and Setup
|
# App Default Values
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
APP="Profilarr"
|
||||||
|
var_tags="arr;automation"
|
||||||
|
var_cpu="2"
|
||||||
|
var_ram="2048"
|
||||||
|
var_disk="8"
|
||||||
|
var_os="debian"
|
||||||
|
var_version="12"
|
||||||
|
var_unprivileged="1"
|
||||||
|
|
||||||
|
header_info "$APP"
|
||||||
|
variables
|
||||||
color
|
color
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
catch_errors
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
APPLICATION="profilarr"
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
# Check if installation is present
|
||||||
$STD apt-get install -y \
|
if [[ ! -d /opt/${APP}/backend ]]; then
|
||||||
curl \
|
msg_error "No ${APP} Installation Found!"
|
||||||
wget \
|
exit
|
||||||
git \
|
fi
|
||||||
unzip \
|
|
||||||
build-essential \
|
|
||||||
python3 \
|
|
||||||
python3-pip \
|
|
||||||
python3-venv \
|
|
||||||
ca-certificates \
|
|
||||||
gnupg
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing Node.js"
|
# Crawling the new version and checking whether an update is required
|
||||||
$STD mkdir -p /etc/apt/keyrings
|
RELEASE=$(curl -fsSL https://api.github.com/repos/Dictionarry-Hub/profilarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}')
|
||||||
$STD curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||||
$STD echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
# Stopping Services
|
||||||
$STD apt-get update
|
msg_info "Stopping $APP"
|
||||||
$STD apt-get install -y nodejs
|
systemctl stop profilarr
|
||||||
msg_ok "Installed Node.js"
|
msg_ok "Stopped $APP"
|
||||||
|
|
||||||
msg_info "Setup ${APPLICATION}"
|
# Creating Backup
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/Dictionarry-Hub/profilarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}')
|
msg_info "Creating Backup"
|
||||||
temp_file=$(mktemp)
|
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /opt/${APP} /opt/${APP}_config
|
||||||
$STD curl -fsSL -o "$temp_file" "https://github.com/Dictionarry-Hub/profilarr/archive/refs/tags/v${RELEASE}.zip"
|
msg_ok "Backup Created"
|
||||||
cd /tmp
|
|
||||||
$STD unzip -q "$temp_file"
|
|
||||||
$STD mkdir -p /opt/${APPLICATION}
|
|
||||||
$STD mkdir -p /opt/${APPLICATION}_config
|
|
||||||
$STD mv "profilarr-${RELEASE}/backend" /opt/${APPLICATION}/
|
|
||||||
$STD mv "profilarr-${RELEASE}/frontend" /opt/${APPLICATION}/
|
|
||||||
$STD chown -R root:root /opt/${APPLICATION}
|
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
|
||||||
msg_ok "Setup ${APPLICATION}"
|
|
||||||
|
|
||||||
msg_info "Setting up Python Virtual Environment"
|
# Execute Update
|
||||||
$STD python3 -m venv /opt/${APPLICATION}/venv
|
msg_info "Updating $APP to v${RELEASE}"
|
||||||
$STD /opt/${APPLICATION}/venv/bin/pip install --upgrade pip
|
temp_file=$(mktemp)
|
||||||
cd /opt/${APPLICATION}/backend
|
curl -fsSL -o "$temp_file" "https://github.com/Dictionarry-Hub/profilarr/archive/refs/tags/v${RELEASE}.zip"
|
||||||
$STD /opt/${APPLICATION}/venv/bin/pip install -r requirements.txt
|
cd /tmp
|
||||||
$STD /opt/${APPLICATION}/venv/bin/pip install gunicorn
|
unzip -q "$temp_file"
|
||||||
msg_ok "Setup Python Environment"
|
rm -rf /opt/${APP}/backend /opt/${APP}/frontend
|
||||||
|
mv "profilarr-${RELEASE}/backend" /opt/${APP}/
|
||||||
|
mv "profilarr-${RELEASE}/frontend" /opt/${APP}/
|
||||||
|
|
||||||
msg_info "Building Frontend"
|
# Update Python dependencies
|
||||||
cd /opt/${APPLICATION}/frontend
|
cd /opt/${APP}/backend
|
||||||
$STD npm install
|
/opt/${APP}/venv/bin/pip install -r requirements.txt
|
||||||
$STD npm run build
|
|
||||||
$STD mkdir -p /opt/${APPLICATION}/backend/app/static
|
|
||||||
$STD cp -r dist/* /opt/${APPLICATION}/backend/app/static/
|
|
||||||
msg_ok "Built Frontend"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
# Build frontend
|
||||||
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
|
cd /opt/${APP}/frontend
|
||||||
[Unit]
|
npm install
|
||||||
Description=Profilarr Profile Manager
|
npm run build
|
||||||
After=network.target
|
cp -r dist/* /opt/${APP}/backend/app/static/
|
||||||
|
|
||||||
[Service]
|
msg_ok "Updated $APP to v${RELEASE}"
|
||||||
Type=simple
|
|
||||||
User=root
|
|
||||||
WorkingDirectory=/opt/${APPLICATION}/backend
|
|
||||||
Environment=PATH=/opt/${APPLICATION}/venv/bin
|
|
||||||
Environment=CONFIG_PATH=/opt/${APPLICATION}_config
|
|
||||||
ExecStart=/opt/${APPLICATION}/venv/bin/gunicorn --bind 0.0.0.0:6868 --workers 2 --timeout 120 app.main:create_app()
|
|
||||||
Restart=always
|
|
||||||
RestartSec=10
|
|
||||||
|
|
||||||
[Install]
|
# Starting Services
|
||||||
WantedBy=multi-user.target
|
msg_info "Starting $APP"
|
||||||
EOF
|
systemctl start profilarr
|
||||||
|
msg_ok "Started $APP"
|
||||||
|
|
||||||
$STD systemctl daemon-reload
|
# Cleaning up
|
||||||
$STD systemctl enable ${APPLICATION}.service
|
msg_info "Cleaning Up"
|
||||||
$STD systemctl start ${APPLICATION}.service
|
rm -f "$temp_file"
|
||||||
msg_ok "Created Service"
|
rm -rf "/tmp/profilarr-${RELEASE}"
|
||||||
|
msg_ok "Cleanup Completed"
|
||||||
|
|
||||||
motd_ssh
|
# Last Action
|
||||||
customize
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
|
msg_ok "Update Successful"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
start
|
||||||
rm -f "$temp_file"
|
build_container
|
||||||
rm -rf "/tmp/profilarr-${RELEASE}"
|
description
|
||||||
$STD apt-get -y autoremove
|
|
||||||
$STD apt-get -y autoclean
|
msg_ok "Completed Successfully!\n"
|
||||||
msg_ok "Cleaned"
|
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}:6868${CL}"
|
||||||
|
|||||||
@ -1,96 +1,104 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: GitHub Copilot
|
# Author: GitHub Copilot
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://github.com/Dictionarry-Hub/profilarr
|
# Source: https://github.com/Dictionarry-Hub/profilarr
|
||||||
|
|
||||||
# App Default Values
|
# Import Functions and Setup
|
||||||
APP="Profilarr"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
var_tags="arr;automation"
|
|
||||||
var_cpu="2"
|
|
||||||
var_ram="2048"
|
|
||||||
var_disk="8"
|
|
||||||
var_os="debian"
|
|
||||||
var_version="12"
|
|
||||||
var_unprivileged="1"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
color
|
||||||
|
verb_ip6
|
||||||
catch_errors
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
function update_script() {
|
APPLICATION="profilarr"
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
# Check if installation is present
|
msg_info "Installing Dependencies"
|
||||||
if [[ ! -d /opt/${APP}/backend ]]; then
|
$STD apt-get install -y \
|
||||||
msg_error "No ${APP} Installation Found!"
|
curl \
|
||||||
exit
|
wget \
|
||||||
fi
|
git \
|
||||||
|
unzip \
|
||||||
|
build-essential \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
python3-venv \
|
||||||
|
ca-certificates \
|
||||||
|
gnupg
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
# Crawling the new version and checking whether an update is required
|
msg_info "Installing Node.js"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/Dictionarry-Hub/profilarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}')
|
$STD mkdir -p /etc/apt/keyrings
|
||||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
$STD curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||||
# Stopping Services
|
$STD echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
||||||
msg_info "Stopping $APP"
|
$STD apt-get update
|
||||||
systemctl stop profilarr
|
$STD apt-get install -y nodejs
|
||||||
msg_ok "Stopped $APP"
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
# Creating Backup
|
msg_info "Setup ${APPLICATION}"
|
||||||
msg_info "Creating Backup"
|
RELEASE=$(curl -fsSL https://api.github.com/repos/Dictionarry-Hub/profilarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}')
|
||||||
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /opt/${APP} /opt/${APP}_config
|
temp_file=$(mktemp)
|
||||||
msg_ok "Backup Created"
|
$STD curl -fsSL -o "$temp_file" "https://github.com/Dictionarry-Hub/profilarr/archive/refs/tags/v${RELEASE}.zip"
|
||||||
|
cd /tmp
|
||||||
|
$STD unzip -q "$temp_file"
|
||||||
|
$STD mkdir -p /opt/${APPLICATION}
|
||||||
|
$STD mkdir -p /opt/${APPLICATION}_config
|
||||||
|
$STD mv "profilarr-${RELEASE}/backend" /opt/${APPLICATION}/
|
||||||
|
$STD mv "profilarr-${RELEASE}/frontend" /opt/${APPLICATION}/
|
||||||
|
$STD chown -R root:root /opt/${APPLICATION}
|
||||||
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
|
msg_ok "Setup ${APPLICATION}"
|
||||||
|
|
||||||
# Execute Update
|
msg_info "Setting up Python Virtual Environment"
|
||||||
msg_info "Updating $APP to v${RELEASE}"
|
$STD python3 -m venv /opt/${APPLICATION}/venv
|
||||||
temp_file=$(mktemp)
|
$STD /opt/${APPLICATION}/venv/bin/pip install --upgrade pip
|
||||||
curl -fsSL -o "$temp_file" "https://github.com/Dictionarry-Hub/profilarr/archive/refs/tags/v${RELEASE}.zip"
|
cd /opt/${APPLICATION}/backend
|
||||||
cd /tmp
|
$STD /opt/${APPLICATION}/venv/bin/pip install -r requirements.txt
|
||||||
unzip -q "$temp_file"
|
$STD /opt/${APPLICATION}/venv/bin/pip install gunicorn
|
||||||
rm -rf /opt/${APP}/backend /opt/${APP}/frontend
|
msg_ok "Setup Python Environment"
|
||||||
mv "profilarr-${RELEASE}/backend" /opt/${APP}/
|
|
||||||
mv "profilarr-${RELEASE}/frontend" /opt/${APP}/
|
|
||||||
|
|
||||||
# Update Python dependencies
|
msg_info "Building Frontend"
|
||||||
cd /opt/${APP}/backend
|
cd /opt/${APPLICATION}/frontend
|
||||||
/opt/${APP}/venv/bin/pip install -r requirements.txt
|
$STD npm install
|
||||||
|
$STD npm run build
|
||||||
|
$STD mkdir -p /opt/${APPLICATION}/backend/app/static
|
||||||
|
$STD cp -r dist/* /opt/${APPLICATION}/backend/app/static/
|
||||||
|
msg_ok "Built Frontend"
|
||||||
|
|
||||||
# Build frontend
|
msg_info "Creating Service"
|
||||||
cd /opt/${APP}/frontend
|
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
|
||||||
npm install
|
[Unit]
|
||||||
npm run build
|
Description=Profilarr Profile Manager
|
||||||
cp -r dist/* /opt/${APP}/backend/app/static/
|
After=network.target
|
||||||
|
|
||||||
msg_ok "Updated $APP to v${RELEASE}"
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
WorkingDirectory=/opt/${APPLICATION}/backend
|
||||||
|
Environment=PATH=/opt/${APPLICATION}/venv/bin
|
||||||
|
Environment=CONFIG_PATH=/opt/${APPLICATION}_config
|
||||||
|
ExecStart=/opt/${APPLICATION}/venv/bin/gunicorn --bind 0.0.0.0:6868 --workers 2 --timeout 120 app.main:create_app()
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10
|
||||||
|
|
||||||
# Starting Services
|
[Install]
|
||||||
msg_info "Starting $APP"
|
WantedBy=multi-user.target
|
||||||
systemctl start profilarr
|
EOF
|
||||||
msg_ok "Started $APP"
|
|
||||||
|
|
||||||
# Cleaning up
|
$STD systemctl daemon-reload
|
||||||
msg_info "Cleaning Up"
|
$STD systemctl enable ${APPLICATION}.service
|
||||||
rm -f "$temp_file"
|
$STD systemctl start ${APPLICATION}.service
|
||||||
rm -rf "/tmp/profilarr-${RELEASE}"
|
msg_ok "Created Service"
|
||||||
msg_ok "Cleanup Completed"
|
|
||||||
|
|
||||||
# Last Action
|
motd_ssh
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
customize
|
||||||
msg_ok "Update Successful"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
msg_info "Cleaning up"
|
||||||
build_container
|
rm -f "$temp_file"
|
||||||
description
|
rm -rf "/tmp/profilarr-${RELEASE}"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
msg_ok "Completed Successfully!\n"
|
$STD apt-get -y autoclean
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
msg_ok "Cleaned"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6868${CL}"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user