-
-
Save nayr1991/d77bab5226c737bc7b61 to your computer and use it in GitHub Desktop.
Aria2c + webui-aria2 to Ubuntu on Odroid-C1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get install -y aria2 | |
sudo mkdir /etc/aria2 | |
sudo touch /etc/aria2/aria2.session | |
read -e -i "aria2" -p "What username do you want to use?" ariauser | |
read -e -i "aria2" -p "What password do you want to use?" ariapass | |
read -e -p "What Directory do you want aria2 to show?" ariadir | |
sudo bash -c "cat <<EOT > /etc/aria2/aria2.conf | |
daemon=true | |
continue=true | |
enable-rpc=true | |
rpc-listen-port=6800 | |
rpc-listen-all=true | |
check-certificate=false | |
auto-file-renaming=false | |
allow-overwrite=true | |
file-allocation=none | |
disable-ipv6=true | |
max-download-limit=0 | |
max-overall-download-limit=0 | |
max-concurrent-downloads=1 | |
max-connection-per-server=4 | |
log=/var/log/aria2.log | |
log-level=error | |
summary-interval=120 | |
timeout=600 | |
retry-wait=30 | |
max-tries=50 | |
save-session=/etc/aria2/aria2.session | |
input-file=etc/aria2/aria2.session | |
save-session-interval=10 | |
disk-cache=25M | |
EOT" | |
echo rpc-user=$ariauser >> /etc/aria2/aria2.conf | |
echo rpc-passwd=$ariapass >> /etc/aria2/aria2.conf | |
echo dir=$ariadir >> /etc/aria2/aria2.conf | |
curl -L https://gist.githubusercontent.com/nayr1991/425ed55b54f78ce17fc6/raw -o /etc/init.d/aria2 | |
sudo service aria2 start | |
sudo apt-get install -y nginx | |
mkdir /tmp/webui | |
wget -P /tmp/webui/ https://github.com/ziahamza/webui-aria2/archive/master.zip | |
unzip /tmp/webui/master.zip -d /tmp/webui/ | |
sudo mv /tmp/webui/webui-aria2-master /usr/share/nginx/html/aria2 | |
rm -rf /tmp/webui |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment