Update 2024-12-22 11:01 OpenBSD/amd64-t14
This commit is contained in:
parent
4ec4facf23
commit
d0c4c84117
63
.bin/aria
Executable file
63
.bin/aria
Executable file
@ -0,0 +1,63 @@
|
||||
#!/bin/sh
|
||||
|
||||
DIR="/home/sdk/.aria2"
|
||||
mkdir -p "$DIR"
|
||||
|
||||
for cmd in $@
|
||||
do
|
||||
case $cmd in
|
||||
seed|upload|up)
|
||||
OPTS="$OPTS
|
||||
--seed-ratio=0.0
|
||||
--max-overall-upload-limit=5M
|
||||
--max-overall-download-limit=1
|
||||
--check-integrity=true
|
||||
--bt-hash-check-seed=true
|
||||
--bt-seed-unverified=true
|
||||
-j 100
|
||||
"
|
||||
shift ;;
|
||||
download|dl)
|
||||
OPTS="$OPTS
|
||||
--max-overall-upload-limit=1
|
||||
--max-overall-download-limit=85M
|
||||
--seed-time=0
|
||||
--lowest-speed-limit=30K
|
||||
--bt-request-peer-speed-limit=100K
|
||||
--file-allocation=trunc
|
||||
-j 6
|
||||
"
|
||||
shift ;;
|
||||
overwrite|over|force)
|
||||
OPTS="$OPTS
|
||||
--allow-overwrite=true"
|
||||
shift ;;
|
||||
1) OPTS="$OPTS -j 1"
|
||||
shift ;;
|
||||
esac
|
||||
done
|
||||
|
||||
DEFAULT="\
|
||||
--enable-dht=false
|
||||
--enable-dht6=false
|
||||
--bt-force-encryption=true
|
||||
--enable-peer-exchange=false
|
||||
--auto-save-interval=30
|
||||
--save-session-interval=30
|
||||
--bt-enable-lpd=false
|
||||
--bt-save-metadata=true
|
||||
--bt-load-saved-metadata=true
|
||||
--bt-prioritize-piece=head=10M,tail=10M
|
||||
--log=$DIR/aria2.log
|
||||
--dht-file-path=$DIR/dht.dat
|
||||
--dht-file-path6=$DIR/dht6.dat
|
||||
--save-cookies=$DIR/cookies.dat
|
||||
--save-session=$DIR/session.dat
|
||||
"
|
||||
set -x
|
||||
if [ -z "$@" ]
|
||||
then
|
||||
aria2c $DEFAULT $OPTS *.torrent
|
||||
else
|
||||
aria2c $DEFAULT $OPTS "$@"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user