diff --git a/.bin/aria b/.bin/aria index 974d2fd..c2aff19 100755 --- a/.bin/aria +++ b/.bin/aria @@ -3,6 +3,38 @@ DIR="/home/sdk/.aria2" mkdir -p "$DIR" +SECOPTS="\ + --bt-enable-lpd=false + --enable-peer-exchange=false + --enable-dht=false + --enable-dht6=false +" + +PUBLIC="\ + --dht-listen-port=55500 + --bt-enable-lpd=true + --enable-peer-exchange=true + --enable-dht=true + --enable-dht6=true +" + +DEFAULT="\ + --auto-save-interval=30 + --save-session-interval=30 + --listen-port=55500 + --log-level=info + --disk-cache=256M + --bt-save-metadata=true + --bt-load-saved-metadata=true + --bt-prioritize-piece=head=10M,tail=10M + --content-disposition-default-utf8=true + --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 +" + for cmd in $@ do case $cmd in @@ -38,6 +70,8 @@ do --bt-min-crypto-level=arc4 " shift ;; + pub|public) SECOPTS="$PUBLIC" + shift ;; seq|1) OPTS="$OPTS -j 1 -Z " @@ -45,32 +79,10 @@ do 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 - --listen-port=55500 - --dht-listen-port=55500 - --bt-enable-lpd=false - --log-level=info - --disk-cache=256M - --bt-save-metadata=true - --bt-load-saved-metadata=true - --bt-prioritize-piece=head=10M,tail=10M - --content-disposition-default-utf8=true - --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 + aria2c $DEFAULT $OPTS $SECOPTS *.torrent else - aria2c $DEFAULT $OPTS "$@" + aria2c $DEFAULT $OPTS $SECOPTS "$@" fi diff --git a/.bin/osmc b/.bin/osmc index 9b2f69b..88a4a46 100755 --- a/.bin/osmc +++ b/.bin/osmc @@ -1,11 +1,10 @@ #!/bin/sh case $1 in - cp) shift; scp -r $@ osmc:/media/USBDisk/ ;; + cp) shift; rsync -rvP $@ osmc:/media/USBDisk/ ;; df) ssh osmc "df -h /media/USBDisk/" ;; ls) ssh osmc "cd /media/USBDisk/ && ls -1 | grep -v lost+found" ;; - lls) ssh osmc "cd /media/USBDisk/ && ls -lh | grep -v lost+found" ;; + lls) ssh osmc "cd /media/USBDisk/ && ls -lh | grep -v lost+found" ;; rm) shift; ssh osmc "cd /media/USBDisk/ && rm -v $@" ;; - *) echo "available commands: df, ls, lls, cp , rm " ;; + *) echo "available commands: df, ls, lls, cp , rm " ;; esac -