Eu instalei aria2 em meu servidor doméstico e configurei-o para ser executado como daemon. Eu também instalei o uget no meu próprio pc e o configurei para conectar a aria2. Tudo funciona bem, mas ... sempre que eu fechar no meu pc. Aria no servidor faz uma pausa no download também ... Parece que estou perdendo alguma coisa. Eu quero ter um comportamento parecido com o daemon de transmissão quando eu posso iniciar o download de qualquer dispositivo e esquecê-lo, mas com todos os tipos de downloads, não apenas torrents.
server:
ubuntu server 16.04.3 4.14.0-041400-lowlatency
aria 1.33.1
client:
ubuntu desktop 16.04.3
uget 2.2.0
arquivo init.d roubado da web
#!/bin/sh
### BEGIN INIT INFO
# Provides: aria2
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: aria2c init script.
# Description: Starts and stops aria2 daemon.
### END INIT INFO
umask 0002
USER="aria2c"
DAEMON=/usr/local/bin/aria2c
CONF=/home/ghs/.aria2/aria2.conf
start() {
if [ -f $CONF ]; then
echo "Starting aria2 daemon"
start-stop-daemon -S -c $USER -x $DAEMON -- -D --conf-path=$CONF
else
echo "Couldn't start aria2 daemon for $USER (no $CONF found)"
fi
}
stop() {
start-stop-daemon -o -c $USER -K -u $USER -x $DAEMON
}
status() {
dbpid='pgrep -fu $USER $DAEMON'
if [ -z "$dbpid" ]; then
echo "aria2c daemon for USER $btsuser: not running."
else
echo "aria2c daemon for USER $btsuser: running (pid $dbpid)"
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload|force-reload)
stop
start
;;
status)
status
;;
*)
echo "Usage: /etc/init.d/aria2 {start|stop|reload|force-reload|restart|status}"
exit 1
esac
exit 0
arquivo aria2.conf
daemon=true
allow-overwrite=false
check-certificate=false
dir=/mnt/storage/Downloads
enable-rpc=true
rpc-listen-port=6800
rpc-listen-all=true
rpc-secret=topsecret
file-allocation=falloc
disable-ipv6=true
log=/home/ghs/.aria2/aria2.log
log-level=warn
auto-save-interval=30
save-session=/home/ghs/.aria2/aria2.sav
input-file=/home/ghs/.aria2/aria2.sav
save-session-interval=30
force-save=true
#check-integrity=true
continue=true
bt-min-crypto-level=arc4
bt-require-crypto=true
bt-request-peer-speed-limit=1M
disk-cache=100M
quiet=true
bt-load-saved-metadata=true
bt-save-metadata=true
follow-torrent=true
ls -la conf dir
ghs@GHS:~/.aria2$ ls -la
total 24
drwxrwx--- 1 aria2c aria2c 70 Feb 7 19:46 .
drwxr-xr-x 1 ghs ghs 428 Feb 7 14:40 ..
-r--r----- 1 aria2c aria2c 603 Feb 7 19:28 aria2.conf
-rw-rw---- 1 aria2c aria2c 3284 Feb 7 19:17 aria2.log
-rw-rw-r-- 1 aria2c aria2c 254 Feb 7 19:20 aria2.sav
-rw-rw-r-- 1 aria2c aria2c 10696 Feb 7 19:20 dht.dat