Giter VIP home page Giter VIP logo

aria2-tools's Introduction

Aria2 Tools

Some tools and instructions to help supplement aria2 when used as a download server.

bin/aria2q

List the download queue on the local machine.

Assumes the aria2 RPC server is available at localhost:6800

initscript/aria2c

Example Debian init script to put in /etc/init.d/

It is set up for Ubuntu 17.04 (Zesty's) packaged aria2c from the package "aria2" (see instructions below). If you're using Debian Squeeze you will want to change /usr/bin for /opt/aria2/bin and follow the instructions to install into /opt/aria2 below.

initscript/aria2.conf

Example config file to put in /etc to use alongside the init script.

Installing aria2 as download server on Debian Squeeze

The version of aria2 in the Debian Squeeze repositories is too old for these tools and for the web client I use to handle.

The version in wheezy requires a libc update, so that's a no go too.

I just downloaded aria2 1.16.3 and built from source:

$ sudo apt-get build-essential aria2
$ tar xjf aria2-1.16.3.tar.bz2
$ ./configure --prefix=/opt/aria2-1.16.3
$ make
$ sudo make install
$ cd /opt
$ sudo ln -s aria2-1.16.3 aria2
$ sudo ln -s /opt/aria2/bin/aria2c /usr/local/bin/aria2c

Create a user to run the daemon as, and a download directory

$ sudo useradd --system --home-dir /var/local/aria2 download
$ sudo mkdir /var/local/aria2/down
$ sudo chown download: /var/local/aria2/down
$ sudo chmod ug=rwx,o=rx /var/local/aria2/down

I then copied in initscript/aria2c to /etc/init.d/aria2c.

Put the following in /etc/aria2.conf:

dir=/var/local/aria2/down
disable-ipv6=true
rpc-listen-all=true
enable-rpc=true
on-download-complete=/opt/aria2-tools/hooks/aria2_notify_complete

(you should set your dir= to the directory you want downloads to go in)

I then tested the init script:

$ sudo /etc/init.d/aria2c start
$ sudo /etc/init.d/aria2c status
$ sudo /etc/init.d/aria2c stop
$ sudo /etc/init.d/aria2c status
$ sudo /etc/init.d/aria2c start

Then installed it to run at startup:

$ sudo update-rc.d aria2c defaults

I then cloned a copy of webui-aria2 into /opt and linked into /var/www (I already had apache web server installed):

$ cd /opt
$ sudo git clone git://github.com/ziahamza/webui-aria2.git
$ sudo ln -s /opt/webui-aria2 /var/www/aria2

Then I can browse to http://minerva/aria2 from any machine on my network to view and manipulate the download queue.

I wrote the tool bin/aria2q so I can inspect the queue from the command line.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.