Files
ProxmoxVE/install/aria2-install.sh
CanbiZ (MickLesk) b1edd80a96 chore(install): add Github source links to all fetch_and_deploy scripts
77 additional install scripts had fetch_and_deploy_gh_release calls but
no GitHub link in the Source header. Merged the primary app repo into
the Source header as:
  # Source: https://website.com/ | Github: https://github.com/OWNER/REPO

Where multiple fetch_and_deploy calls existed (app + dependency), the
primary app repo was selected:
- ersatztv: ErsatzTV/ErsatzTV (not ffmpeg)
- firefly: firefly-iii/firefly-iii (not data-importer)
- komga: gotson/komga (not kepubify dep)
- sabnzbd: sabnzbd/sabnzbd (not par2cmdline-turbo dep)
- signoz: SigNoz/signoz (not otel-collector)
- tunarr: chrisbenincasa/tunarr (not ffmpeg dep)

Also fixed cosmos-install.sh double https:// in Source URL.

Skipped: autocaliweb (source already on codeberg, GitHub repos are deps only)
2026-02-24 14:28:45 +01:00

91 lines
2.1 KiB
Bash

#!/usr/bin/env bash
# Copyright (c) 2021-2026 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://aria2.github.io/ | Github: https://github.com/aria2/aria2
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Aria2"
$STD apt install -y aria2
msg_ok "Installed Aria2"
read -r -p "${TAB3}Would you like to add AriaNG? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Dependencies"
$STD apt install -y nginx
systemctl disable -q --now nginx
rm /etc/nginx/sites-enabled/*
msg_ok "Installed Dependencies"
fetch_and_deploy_gh_release "ariang" "mayswind/ariang" "prebuild" "latest" "/var/www" "AriaNg-*-AllInOne.zip"
msg_info "Configure nginx"
cat <<EOF >/etc/nginx/conf.d/ariang.conf
server {
listen 6880 default_server;
listen [::]:6880 default_server;
server_name _;
root /var/www;
index index.html;
location / {
try_files \$uri \$uri/ =404;
}
}
EOF
cp /lib/systemd/system/nginx.service /lib/systemd/system/ariang.service
systemctl enable -q --now ariang
msg_ok "Configured nginx"
fi
msg_info "Creating Service"
mkdir -p /root/downloads
rpc_secret=$(openssl rand -base64 8)
echo "rpc-secret: $rpc_secret" >>~/rpc.secret
cat <<EOF >/root/aria2.daemon
dir=/root/downloads
file-allocation=falloc
max-connection-per-server=4
max-concurrent-downloads=2
max-overall-download-limit=0
min-split-size=25M
rpc-allow-origin-all=true
rpc-secret=${rpc_secret}
input-file=/var/tmp/aria2c.session
save-session=/var/tmp/aria2c.session
EOF
cat <<EOF >/etc/systemd/system/aria2.service
[Unit]
Description=Aria2c download manager
After=network.target
[Service]
Type=simple
User=root
Group=root
ExecStartPre=/usr/bin/env touch /var/tmp/aria2c.session
ExecStart=/usr/bin/aria2c --console-log-level=warn --enable-rpc --rpc-listen-all --conf-path=/root/aria2.daemon
TimeoutStopSec=20
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now aria2
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc