前言
Aria2 有一个配置项on-download-complete
,在下载完后执行一个脚本。当下载完成后 Aria2
会给脚本传递 3
个变量 $1、$2、$3
分别为 gid 、文件数量、文件路径
。利用这个配置项和这些变量就可以实现很多功能,比如下载完成后调用 Rclone
进行上传操作。整个过程简单来说就是,Aria2
下载文件到 VPS
,完成后告诉 Rclone
将这个文件上传到网盘。理论上只要是 Rclone
支持的网盘,都可以按照这个思路来实现伪离线下载。
安装 Aria2
这里使用 Aria2 一键安装管理脚本 增强版,执行下面的代码下载并运行脚本,出现脚本操作菜单输入 1
开始安装。
wget -N git.io/aria2.sh && chmod +x aria2.sh && ./aria2.sh
安装和配置 Rclone
RCLONE 官方提供了一键安装脚本:
curl https://rclone.org/install.sh | sudo bash
安装完后,输入 rclone config
命令进入交互式配置选项,按照提示一步一步来进行操作即可。如果你一脸懵逼,可以去看《Rclone 安装配置教程》来了解配置的详细过程。
配置自动上传脚本
Aria2
一键安装管理脚本 增强版 整合了 Aria2
完美配置 ,安装后会附带一些附加功能脚本功能脚本,RCLONE
自动上传脚本就是其中之一。由于默认不启用,所以需要手动启用。
TIPS: 本项目的上传脚本使用更稳定快速的原生命令上传方式,而非处在测试阶段的挂载方式,这点和一般的脚本不同。
输入nano /root/.aria2c/aria2.conf
打开 Aria2
配置文件进行修改。或使用Aria2 一键安装管理脚本 增强版中的手动修改选项打开配置文件进行修改。找到“下载完成后执行的命令”,把clean.sh
替换为upload.sh
。
# 下载完成后执行的命令
on-download-complete=/root/.aria2c/upload.sh
输入nano /root/.aria2c/script.conf
打开附加功能脚本配置文件进行修改,有中文注释,按照自己的实际情况进行修改,第一次使用只建议修改网盘名称。
# 网盘名称(RCLONE 配置时填写的 name)
drive-name=OneDrive
重启 Aria2
。脚本选项重启或者执行以下命令:
service aria2 restart
检查是否配置成功
执行 upload.sh
脚本,提示 success
即配置成功。
/root/.aria2c/upload.sh
当进行完以上所有操作,现在下载文件就会自动上传至相应的网盘。
转载:https://p3terx.com/archives/offline-download-of-onedrive-gdrive.html
Read information now. Everything about medicine.
nexium sale
Long-Term Effects. Definitive journal of drugs and therapeutics.
the presence of a detrimental PNS means that achieving either static disease or a partial response may not be an option for the patient, e comprare lasix
Hello. And Bye Bye Bye.
Read now. Get warning information here.
https://stromectolst.com/# where to buy ivermectin pills
Drugs information sheet. Read information now.
п»їMedicament prescribing information. Top 100 Searched Drugs.
ivermectin 4
Long-Term Effects. Some are medicines that help people when doctors prescribe.
Read here. Best and news about drug.
ivermectin 1 cream generic
earch our drug database. drug information and news for professionals and consumers.
Get information now. Read information now.
stromectol online pharmacy
Medscape Drugs & Diseases. All trends of medicament.
Drugs information sheet. Some are medicines that help people when doctors prescribe.
stromectol without prescription
Read information now. Get warning information here.
Commonly Used Drugs Charts. Actual trends of drug.
where to buy stromectol online
Everything what you want to know about pills. Everything what you want to know about pills.
Cautions. Everything information about medication.
ivermectin usa price
drug information and news for professionals and consumers. Read here.