diff --git a/Lib.sh b/Lib.sh index 77a40d4..6999973 100644 --- a/Lib.sh +++ b/Lib.sh @@ -4,3 +4,9 @@ mkcd(){ mkdir -vp "$1" && \ cd "$1" } + +cpdir(){ + echo "'$1'" + mkdir -p "$1" && \ + cp -rT "/$1" "./$1" +} diff --git a/Server/Repo.Update.sh b/Server/Repo.Update.sh index 1e7aacf..1b11f2c 100755 --- a/Server/Repo.Update.sh +++ b/Server/Repo.Update.sh @@ -23,12 +23,14 @@ mkcd ./Root /Server/Scripts/Backup/*.sh /Server/Scripts/Backup/*.cfg \ ./Server/Scripts/Backup/ + cpdir Transfers/aria2/Conf + cd .. mkcd ./Home - mkdir -vp ./.config - for p in \ - aria2 - do - cp -vrT /$h/.config/$p ./.config/$p - done + #mkdir -vp ./.config + #for p in \ + # aria2 + #do + # cp -vrT /$h/.config/$p ./.config/$p + #done diff --git a/Server/Root/Transfers/aria2/Conf/Server.conf b/Server/Root/Transfers/aria2/Conf/Server.conf new file mode 100644 index 0000000..4b87ccb --- /dev/null +++ b/Server/Root/Transfers/aria2/Conf/Server.conf @@ -0,0 +1,57 @@ +# Promemoria, link per prendere spunto: +# * https://gist.github.com/qzm/a54559726896d5e6bf21adf2363ad334 +# * https://libreddit.kavin.rocks/r/seedboxes/comments/fz2od8/unlimited_seeding_with_aria2/ +# ** https://pastebin.com/Yyqubrci + +# 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 + +# Moderate logging to file +log-level=notice +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 +rpc-listen-port=6800 +rpc-allow-origin-all=true + +# Session data persistance +save-session=/Transfers/aria2/Service/Session.dat +input-file=/Transfers/aria2/Service/Session.dat +save-cookies=/Transfers/aria2/Service/Cookies.txt +load-cookies=/Transfers/aria2/Service/Cookies.txt + +# Cache storage +dht-file-path=/Transfers/aria2/Service/DHT.dat + +# [ BitTorrent ] + +# Store metadata to .torrent files and always load it +bt-save-metadata=true +bt-load-saved-metadata=true + +# 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 +bt-enable-lpd=true + +# Peer exchange for more efficient transmission +enable-peer-exchange=true + +# Seed forever +seed-ratio=0.0 + +# [ --- ] + diff --git a/Server/Root/etc/nginx/sites-available/root.conf b/Server/Root/etc/nginx/sites-available/root.conf index 9f0ea78..8ab7ee3 100644 --- a/Server/Root/etc/nginx/sites-available/root.conf +++ b/Server/Root/etc/nginx/sites-available/root.conf @@ -4,6 +4,7 @@ server { } server { + listen 81; listen 443 ssl; server_name hlb0.octt.eu.org; ssl_certificate /etc/letsencrypt/live/hlb0.octt.eu.org/fullchain.pem;