From b92110b17a989abde121f1d23b47bbdb8b285c9b Mon Sep 17 00:00:00 2001 From: Sam Heinz <54530346+asylumexp@users.noreply.github.com> Date: Mon, 15 Apr 2024 18:00:16 +1000 Subject: [PATCH] [Aria2] Update to include config file --- install/aria2-install.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/install/aria2-install.sh b/install/aria2-install.sh index 3d3b3d7e..8d6562e9 100644 --- a/install/aria2-install.sh +++ b/install/aria2-install.sh @@ -23,7 +23,6 @@ msg_ok "Installed Dependencies" msg_info "Installing Aria2" DEBIAN_FRONTEND=noninteractive $STD apt-get -o Dpkg::Options::="--force-confold" install -y aria2 -systemctl enable -q --now apt-cacher-ng msg_ok "Installed Aria2" read -r -p "Would you like to add ar? " prompt @@ -46,10 +45,13 @@ RestartSec=120 [Install] WantedBy=multi-user.target' >$service_path + systemctl enable --now -q aria2.service msg_ok "Installed AriaNG" fi + msg_info "Creating Service" - service_path="/etc/systemd/system/aria2.service" + +service_path="/etc/systemd/system/aria2.service" echo '[Unit] Description=Aria2c download manager After=network.target @@ -65,8 +67,23 @@ Restart=on-failure [Install] WantedBy=multi-user.target' >$service_path + +conf_path="/root/aria2.daemon" +echo 'continue +dir=/var/www/downloads +file-allocation=falloc +max-connection-per-server=4 +max-concurrent-downloads=2 +max-overall-download-limit=0 +min-split-size=25M +rpc-allow-origin-all=true +rpc-secret=YouShouldChangeThis +input-file=/var/tmp/aria2c.session +save-session=/var/tmp/aria2c.session' >$conf_path systemctl enable --now -q aria2.service +msg_ok "Created Service" + motd_ssh customize