Aria2 一键安装管理脚本
- 项目地址:https://github.com/P3TERX/aria2.sh
- 一键安装代码
P3TERX的完美配置脚本
bash <(wget -qO- git.io/aria2.sh)
2个备用脚本
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubiBackup/doubi/master/aria2.sh && chmod +x aria2.sh && bash aria2.sh
wget -N --no-check-certificate https://www.moerats.com/usr/shell/Aria2/aria2.sh && chmod +x aria2.sh && bash aria2.sh
启动:service aria2 start
停止:service aria2 stop
重启:service aria2 restart
查看状态:service aria2 status
配置文件:/root/.aria2/aria2.conf
下载目录:/usr/local/caddy/www/aria2/Download (备用1)或 usr/local/caddy/www/file (备用2)
Aria2 + 自动上传OneDrive 脚本 搭配OneIndex
wget --no-check-certificate https://67zz.cn/shell/install_auto_aria2.sh && chmod +x install_auto_aria2.sh && bash install_auto_aria2.sh
Google drive离线配置
- YouTube https://youtu.be/ZWgI7Rx5Nsk
- AriaNG网页版:http://ariang.mayswind.net/latest
- AriaNg-Native桌面版 https://github.com/mayswind/AriaNg-Native/releases
- Aria2 一键安装管理脚本
wget -N git.io/aria2.sh && chmod +x aria2.sh && ./aria2.sh
- 安装和配置 Rclone
curl https://rclone.org/install.sh | sudo bash
- 安装完执行 rclone config
- 选n (New remote)
- 定义name(要记好,后面要用!!!!)
- 选13 google Drive
- Client Id 回车
- client_secret> 回车
- scope> 输入1
- root_folder_id> 回车
- service_account_file> 回车
- Edit advanced config 选n
- Use auto config 选n
- 点链接获取授权码
- Configure this as a team drive 选y
- Enter a Team Drive ID> 在列出的清单里选择
- 确认无误输入Y
- 最后选q
- 配置自动上传脚本
vi /root/.aria2/autoupload.sh
修改以下两项:
name=’Onedrive’ #之前让你记好的那个名字
folder=’/DRIVEX/Download’ #随便改不改都行
vi /root/.aria2/aria2.conf
找到“下载完成后执行的命令”(这个有点眼花,视频按暂停慢慢看)
下载完成后执行的命令
删除.aria2文件
on-download-complete=/root/.aria2/delete.aria2.sh
调用 rclone 上传(move)到网盘
on-download-complete=/root/.aria2/autoupload.sh
在on-download-complete=/root/.aria2/delete.aria2.sh前加上#
去掉#on-download-complete=/root/.aria2/autoupload.sh前面的#
- 重启 Aria2(一定要重启)
service aria2 restart
大家可以先用小文件做测试如果下载后不会上传,首先检查上面编辑的过的两处有没有错误,尤其是是加#号那个,对照我的视频再看一次。另外,再执行一次service aria2 restart命令,当你感觉卡了一下的时候,就证明重启成功了