Aria2

Install aria2

sudo apt-get install aria2

creat the config file:

mkdir ~/.aria2
touch ~/.aria2/aria2.session
nano ~/.aria2/aria2.conf

Enter the follow words:

dir=/home/pi/Download
disable-ipv6=true
enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true
rpc-listen-port=6800
continue=true
input-file=/home/pi/.aria2/aria2.session
save-session=/home/pi/.aria2/aria2.session
max-concurrent-downloads=3

Test the installation:

aria2c –conf-path=/home/pi/.aria2/aria2.conf

Create an init script:

sudo nano /etc/init.d/aria2

Enter the follow words:

#! /bin/sh
# /etc/init.d/aria2

### BEGIN INIT INFO
# Provides: aria2cRPC
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: aria2c RPC init script.
# Description: Starts and stops aria2 RPC services.
### END INIT INFO

RETVAL=0
case “$1” in
start)
echo -n “Starting aria2c daemon: ”
umask 0000
aria2c –daemon=true –enable-rpc –rpc-listen-all -D –conf-path=/home/pi/.aria2/aria2.conf
RETVAL=$?
echo
;;
stop)
echo -n “Shutting down aria2c daemon: ”
/usr/bin/killall aria2c
RETVAL=$?
echo
;;
restart)
stop
sleep 3
start
;;
*)
echo $”Usage: $0 {start|stop|restart}”
RETVAL=1
esac
exit $RETVAL

start up the service automatically with:

sudo chmod +x /etc/init.d/aria2
sudo update-rc.d aria2 defaults

Install the Web-UI from github:
https://github.com/binux/yaaw
Put the files in the /var/www/yaaw/
The JSON-RPC Path is:

http://raspberrypi.address:6800/jsonrpc

Reboot the Pi:

sudo reboot

发表评论

电子邮件地址不会被公开。 必填项已用*标注