aria2: Deploy aria2 download manager
The *aria2* role installs the *aria2* download manager and sets it up to run as a system service with RPC enabled. It also sets up the web UI, though that must be installed manually from an archive, for now.
This commit is contained in:
17
roles/aria2/templates/aria2.conf.j2
Normal file
17
roles/aria2/templates/aria2.conf.j2
Normal file
@@ -0,0 +1,17 @@
|
||||
dir={{ aria2_download_dir }}
|
||||
bt-exclude-tracker=*
|
||||
bt-prioritize-piece=head,tail
|
||||
bt-require-crypto=true
|
||||
dht-listen-port={{ aria2_dht_listen_ports }}
|
||||
dht-entry-point=dht.transmissionbt.com:6881
|
||||
dht-file-path=/var/lib/aria2/dht.dat
|
||||
dht-file-path6=/var/lib/aria2/dht6.dat
|
||||
listen-port={{ aria2_listen_ports }}
|
||||
enable-rpc=true
|
||||
rpc-listen-all=true
|
||||
log=/var/log/aria2.log
|
||||
log-level=notice
|
||||
continue
|
||||
save-session=/var/lib/aria2/aria2.state
|
||||
input-file=/var/lib/aria2/aria2.state
|
||||
save-session-interval=10
|
||||
46
roles/aria2/templates/configuration.js.j2
Normal file
46
roles/aria2/templates/configuration.js.j2
Normal file
@@ -0,0 +1,46 @@
|
||||
angular
|
||||
.module('webui.services.configuration', [])
|
||||
.constant('$name', 'Aria2 WebUI') // name used across the entire UI
|
||||
.constant('$titlePattern', 'active: {active} - waiting: {waiting} - stopped: {stopped} — {name}')
|
||||
.constant('$pageSize', 11) // number of downloads shown before pagination kicks in
|
||||
.constant('$authconf', { // default authentication configuration, never fill it in case the webui is hosted in public IP as it can be compromised
|
||||
host: location.protocol.startsWith('http') ? location.hostname : 'localhost',
|
||||
path: '/jsonrpc',
|
||||
port: 6800,
|
||||
encrypt: false,
|
||||
auth: { // either add the token field or the user and pass field, not both.
|
||||
// token: '$YOUR_SECRET_TOKEN$'
|
||||
/*-----------------------------*/
|
||||
// user: '*YOUR_USERNAME*',
|
||||
// pass: '*YOUR_SECRET_PASS*'
|
||||
},
|
||||
directURL: '' // If supplied, links will be created to enable direct download from the aria2 server, requires appropriate webserver to be configured
|
||||
})
|
||||
.constant('$enable', {
|
||||
|
||||
torrent: true, // bittorrent support only enabled if supported by aria2 build, set to false otherwise to permanently disable it
|
||||
|
||||
metalink: true, // metalink support only enabled if supported by aria2 build, set to false to permanently disable it
|
||||
|
||||
sidebar: { // configuration related to the sidebar next to the list of downloads
|
||||
show: true, // set to false to completely hide the sidebar. Other elements inside will be automatically hidden
|
||||
|
||||
stats: true, // set to false to hide the global statistic section (contains the speed graph for now)
|
||||
|
||||
filters: true, // set to false to hide the Download Filters
|
||||
|
||||
starredProps: true // only shown when at least one property is added to the starred list, set to false to permanently hide the Quick Access Settings inside the sidebar
|
||||
}
|
||||
})
|
||||
.constant('$starredProps', [ // default list of Quick Access Properties. Can be overridden by making modification through the Global Settings dialog
|
||||
// go to Global Settings dialog to see their description
|
||||
'dir', 'conf-path', 'auto-file-renaming', 'max-connection-per-server'
|
||||
])
|
||||
.constant('$downloadProps', [ // Similar to starred Quick Access properties but for adding new downloads.
|
||||
// go to Advance Download Options when adding a new download to view the list of possible options
|
||||
'header', 'http-user', 'http-passwd', 'pause', 'dir', 'max-connection-per-server'
|
||||
])
|
||||
.constant('$globalTimeout', 1000) // interval to update the individual downloads
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user