Upd bittorrent

This commit is contained in:
octospacc 2023-04-16 00:29:42 +02:00
parent 60f9bc6c7d
commit f7f581ddb6
3 changed files with 66 additions and 7 deletions

View File

@ -5,24 +5,31 @@ cd "$( dirname "$( realpath "$0" )" )"
h=home/pi
mkcd ./Root
mkdir -vp ./etc
for p in \
diycron
do
cp -v /etc/$p ./etc/$p
done
mkdir -vp ./etc/systemd/system
cp -v \
/etc/systemd/system/diycron.service \
./etc/systemd/system/
mkdir -vp ./etc/nginx/sites-available
cp -v \
/etc/nginx/sites-available/*.conf /etc/nginx/sites-available/*.old \
./etc/nginx/sites-available/
mkdir -vp ./Server/Scripts/Backup
cp -v \
/Server/Scripts/Backup/*.sh /Server/Scripts/Backup/*.cfg \
./Server/Scripts/Backup/
mkdir -vp ./Server/Start
cp -v /Server/Start/bittorrentd ./Server/Start/
cpdir Transfers/aria2/Conf
cd ..

View File

@ -0,0 +1,10 @@
#!/bin/sh
cd /Transfers/aria2
# Backup
7z a -mx9 -mmt1 "./Service.$(date "+%Y-%m-%d.%H:%M:%S").bak" ./Service
# Download updated trackers from today's lists, add them to aria2.conf
# with bt-tracker= ...
aria2c --conf-path=./Conf/Server.conf --daemon=false

View File

@ -2,12 +2,17 @@
# * https://gist.github.com/qzm/a54559726896d5e6bf21adf2363ad334
# * https://libreddit.kavin.rocks/r/seedboxes/comments/fz2od8/unlimited_seeding_with_aria2/
# ** https://pastebin.com/Yyqubrci
# * https://gist.github.com/ifyour/2be0055adbaea83881aacaab905afd43
# Tip: load this file with: --conf-path=${FILE}
# Note: ensure files /Transfers/aria2/Service/{Session.dat,Cookies.txt} exist before starting, otherwise create as empty
# Start in the background
daemon=true
# [ Misc ]
# Start as non-blocking - kept disabled for use within a systemd service
# daemon=true
# Moderate logging to file
log-level=notice
@ -16,9 +21,6 @@ log=/Transfers/aria2/Service/Log.log
# Directory for storing downloads
dir=/Transfers/Storage
# Today no IPv6 on my WAN, so let's avoid overhead
disable-ipv6=true
# Remote control
enable-rpc=true
rpc-listen-all=true
@ -31,27 +33,67 @@ input-file=/Transfers/aria2/Service/Session.dat
save-cookies=/Transfers/aria2/Service/Cookies.txt
load-cookies=/Transfers/aria2/Service/Cookies.txt
# Keep completed downloads in session (for seeding + stats)
force-save=true
# Set allow overwrite othewise sometimes torrents will stall
allow-overwrite=true
# Cache storage
dht-file-path=/Transfers/aria2/Service/DHT.dat
# RAM Cache for reducing disk I/O - 2x default
# Note: if too high, some could end up in swap, and decrease performance
disk-cache=32MB
# [ Connections ]
# As today no IPv6 on my WAN, so let's avoid overhead
disable-ipv6=true
# - 2x default
max-connection-per-server=2
# Max connections per file
split=10
# Don't use multiple peers when file smaller than:
min-split-size=2M
# [ BitTorrent ]
# Store metadata to .torrent files and always load it
bt-save-metadata=true
bt-load-saved-metadata=true
# Don't account seeding torrents in global downloads limit
bt-detach-seed-only=true
# Port ranges
listen-port=6881-6883
dht-listen-port=6881-6883
# Peer discovery on the global Internet
enable-dht=true
# LAN peer discovery
# Note: it can cause privacy issues, and with many torrents it could flood the LAN
# Note: it can cause LAN privacy issues, and with many torrents it could flood the LAN
bt-enable-lpd=true
bt-lpd-interface=wlan0
# Peer exchange for more efficient transmission
# More efficient transmission
enable-peer-exchange=true
# Max peers per torrent
bt-max-peers=50
# Seed forever
seed-ratio=0.0
# [ --- ]