{"id":741,"date":"2021-08-02T11:03:44","date_gmt":"2021-08-02T03:03:44","guid":{"rendered":"https:\/\/www.eutaboo.com\/?p=741"},"modified":"2022-05-16T14:28:01","modified_gmt":"2022-05-16T06:28:01","slug":"%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e6%90%ad%e5%bb%ba%e7%a7%81%e4%ba%ba%e7%a6%bb%e7%ba%bf%e4%b8%8b%e8%bd%bd%e7%a5%9e%e5%99%a8aria2%ef%bc%8c%e6%90%ad%e9%85%8drclone%e8%87%aa%e5%8a%a8%e4%b8%8a","status":"publish","type":"post","link":"https:\/\/www.eutaboo.com\/index.php\/2021\/08\/02\/%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e6%90%ad%e5%bb%ba%e7%a7%81%e4%ba%ba%e7%a6%bb%e7%ba%bf%e4%b8%8b%e8%bd%bd%e7%a5%9e%e5%99%a8aria2%ef%bc%8c%e6%90%ad%e9%85%8drclone%e8%87%aa%e5%8a%a8%e4%b8%8a\/","title":{"rendered":"\u624b\u628a\u624b\u6559\u4f60\u642d\u5efa\u79c1\u4eba\u79bb\u7ebf\u4e0b\u8f7d\u795e\u5668Aria2\uff0c\u642d\u914dRclone\u81ea\u52a8\u4e0a\u4f20\u81f3\u7f51\u76d8"},"content":{"rendered":"<p><strong><a href=\"https:\/\/blog.laoda.de\/archives\/aria2-rclone-filebrowser#toc-head-16\" target=\"_blank\"  rel=\"nofollow\" >\u539f\u4f5c\u8005\u94fe\u63a5<\/a><\/strong><\/p>\n<h2>\u5b89\u88c5Aria2\u589e\u5f3a\u7248<\/h2>\n<p>\u4e3a\u4e86\u907f\u514d\u51fa\u9519\uff0c\u5b89\u88c5\u4e0b\u9762\u7684\u57fa\u7840\u7ec4\u4ef6\uff1a<\/p>\n<pre><code class=\"language-ssh\">apt install sudo wget curl ca-certificates<\/code><\/pre>\n<p>\u8fd0\u884c\u5b89\u88c5\u811a\u672c<\/p>\n<pre><code class=\"language-ssh\">wget -N git.io\/aria2.sh &amp;&amp; chmod +x aria2.sh<\/code><\/pre>\n<p>\u542f\u52a8Aria2<\/p>\n<pre><code class=\"language-ssh\">.\/aria2.sh<\/code><\/pre>\n<p>\u914d\u7f6eAria2<\/p>\n<pre><code class=\"language-txt\">Aria2 \u4e00\u952e\u5b89\u88c5\u7ba1\u7406\u811a\u672c \u589e\u5f3a\u7248 [v2.7.4] by P3TERX.COM\n\n  0. \u5347\u7ea7\u811a\u672c\n \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\n  1. \u5b89\u88c5 Aria2\n  2. \u66f4\u65b0 Aria2\n  3. \u5378\u8f7d Aria2\n \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\n  4. \u542f\u52a8 Aria2\n  5. \u505c\u6b62 Aria2\n  6. \u91cd\u542f Aria2\n \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\n  7. \u4fee\u6539 \u914d\u7f6e\n  8. \u67e5\u770b \u914d\u7f6e\n  9. \u67e5\u770b \u65e5\u5fd7\n 10. \u6e05\u7a7a \u65e5\u5fd7\n \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\n 11. \u624b\u52a8\u66f4\u65b0 BT-Tracker\n 12. \u81ea\u52a8\u66f4\u65b0 BT-Tracker\n \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\n\n Aria2 \u72b6\u6001: \u5df2\u5b89\u88c5 | \u5df2\u542f\u52a8\n\n \u81ea\u52a8\u66f4\u65b0 BT-Tracker: \u5df2\u5f00\u542f\n\n \u8bf7\u8f93\u5165\u6570\u5b57 [0-12]:<\/code><\/pre>\n<h2>\u914d\u7f6eRclone\uff08\u4ee5\u4e0b\u6765\u81eatwovps\u7684\u6559\u7a0b\u6574\u7406\uff09<\/h2>\n<p>\u4ee5\u4e0b\u5206\u4e3a\u4e09\u5c0f\u6b65\u8fd9\u91cc\u505a\u4e2a\u7b80\u4ecb\uff1a\u7b2c\u4e00\u6b65\u662fPC\u7aef\u83b7\u53d6\u7f51\u76d8\u6388\u6743\u7684\u4ee4\u724c\uff1b\u7b2c\u4e8c\u6b65\u662f\u5728VPS\u91cc\u7ed1\u5b9a\u83b7\u5f97\u7684\u6388\u6743\uff1b\u7b2c\u4e09\u6b65\u624d\u662f\u81ea\u52a8\u4e0a\u4f20\u914d\u7f6e\u3002\u56e0\u4e3aOneDrive\u7684\u6388\u6743\u9700\u8981\u5728\u6d4f\u89c8\u5668\u6253\u5f00\uff0c\u800cVPS\u6ca1\u6709\u56fe\u5f62\u754c\u9762\uff0c\u53ea\u80fd\u5148\u5728PC\u7aef\u83b7\u53d6\u6388\u6743\uff0c\u6240\u4ee5\u7b2c\u4e00\u6b65\u548c\u7b2c\u4e8c\u6b65\u6709\u70b9\u91cd\u590d\u3002<\/p>\n<h3>1\u3001\u7a97\u53e3\uff08PC\uff09\u7aef\u5b89\u88c5Rclone<\/h3>\n<p>\u767b\u5f55<a href=\"https:\/\/rclone.org\/downloads\/\" target=\"_blank\"  rel=\"nofollow\" >rclone<\/a>\u5b98\u7f51\u4e0b\u8f7dRclone\u7684\u7a97\u6237\u7aef\u7684\u5ba2\u6237\u3002<br \/>\n[img]https:\/\/vkceyugu.cdn.bspapp.com\/VKCEYUGU-df9040b6-66ef-461b-92a5-f74c4e71766f\/434eca72-5884-4fe7-9c9d-f4a7aa642a54.png[\/img]<br \/>\n\u4e0b\u8f7d\u89e3\u538b\u5c06\u91cc\u9762\u7684<code>rclone.exe<\/code>\u79fb\u52a8\u5230\u672c\u5730<code>C:\\Windows\\System32<\/code>\u4e0b\u8fd9\u4e2a\u76ee\u5f55\uff0c\u5176\u5b83\u7684\u53ef\u4ee5\u5220\u6389\u6ca1\u5173\u7cfb<br \/>\n\u6309<code>win + R<\/code>\u5feb\u6377\u952e\u6253\u5f00\u8fd0\u884c\uff0c\u8f93\u5165<code>cmd<\/code>\u786e\u5b9a\u6765\u6253\u5f00CMD\u7a97\u53e3\uff0c\u8f93\u5165\u4e0b\u9762\u547d\u4ee4\u5f00\u59cb\u914d\u7f6e \u3002<\/p>\n<pre><code class=\"language-ssh\">rclone config<\/code><\/pre>\n<p>\u7136\u540e\u51fa\u73b0\u5982\u4e0b\u754c\u9762\uff0c\u63d0\u793a\u6309\u8f93\u5165<code>n<\/code>\u56de\u8f66\u521b\u5efa\u4e2a\u65b0\u7684\u8fdc\u7a0b\uff0c\u7136\u540e\u63d0\u793a\u8f93\u5165name\uff0c\u540d\u79f0\u968f\u610f\u4f46\u8981\u8bb0\u4f4f\uff0c\u8fd9\u91cc\u6211\u586b<code>eutaboo<\/code>\u3002<\/p>\n<pre><code class=\"language-txt\">Current remotes:\n\nName                 Type\n====                 ====\n\ne) Edit existing remote\nn) New remote\nd) Delete remote\nr) Rename remote\nc) Copy remote\ns) Set configuration password\nq) Quit config\ne\/n\/d\/r\/c\/s\/q&gt; n\nname&gt; eutaboo<\/code><\/pre>\n<p>\u56de\u8f66\u540e\u51fa\u73b0\u4e00\u957f\u4e32\u7f51\u76d8\u5217\u8868\u8ba9\u4f60\u9009\uff0c\u8fd9\u91cc\u6211\u4eec\u8981\u7ed1\u5b9a\u7684\u662fOneDrive\uff0c \u5176\u5b83\u7f51\u76d8\u7ed1\u5b9a\u6559\u7a0b\u6211\u5c31\u4e0d\u8bf4\u4e86\uff0c \u53ef\u4ee5\u770b\u5230OneDrive\u662f26\uff0c\u90a3\u5c31\u586b\u516526\u56de\u8f66\uff0c\u4e0d\u540c\u7248\u672c\u6570\u5b57\u6392\u5e8f\u53ef\u80fd\u4f1a\u53d8\u5316\uff0c\u8bf7\u81ea\u4e3b\u786e\u8ba4\uff0c\u4f60\u4e5f\u53ef\u4ee5\u7ed1\u5b9a\u5217\u8868\u4e2d\u5176\u5b83\u7f51\u76d8\u3002<\/p>\n<pre><code class=\"language-txt\">Type of storage to configure.\nEnter a string value. Press Enter for the default (&quot;&quot;).\nChoose a number from below, or type in your own value\n 1 \/ 1Fichier\n   \\ &quot;fichier&quot;\n 2 \/ Alias for an existing remote\n   \\ &quot;alias&quot;\n 3 \/ Amazon Drive\n   \\ &quot;amazon cloud drive&quot;\n 4 \/ Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, SeaweedFS, and Tencent COS\n   \\ &quot;s3&quot;\n 5 \/ Backblaze B2\n   \\ &quot;b2&quot;\n 6 \/ Box\n   \\ &quot;box&quot;\n 7 \/ Cache a remote\n   \\ &quot;cache&quot;\n 8 \/ Citrix Sharefile\n   \\ &quot;sharefile&quot;\n 9 \/ Compress a remote\n   \\ &quot;compress&quot;\n10 \/ Dropbox\n   \\ &quot;dropbox&quot;\n11 \/ Encrypt\/Decrypt a remote\n   \\ &quot;crypt&quot;\n12 \/ Enterprise File Fabric\n   \\ &quot;filefabric&quot;\n13 \/ FTP Connection\n   \\ &quot;ftp&quot;\n14 \/ Google Cloud Storage (this is not Google Drive)\n   \\ &quot;google cloud storage&quot;\n15 \/ Google Drive\n   \\ &quot;drive&quot;\n16 \/ Google Photos\n   \\ &quot;google photos&quot;\n17 \/ Hadoop distributed file system\n   \\ &quot;hdfs&quot;\n18 \/ Hubic\n   \\ &quot;hubic&quot;\n19 \/ In memory object storage system.\n   \\ &quot;memory&quot;\n20 \/ Jottacloud\n   \\ &quot;jottacloud&quot;\n21 \/ Koofr\n   \\ &quot;koofr&quot;\n22 \/ Local Disk\n   \\ &quot;local&quot;\n23 \/ Mail.ru Cloud\n   \\ &quot;mailru&quot;\n24 \/ Mega\n   \\ &quot;mega&quot;\n25 \/ Microsoft Azure Blob Storage\n   \\ &quot;azureblob&quot;\n26 \/ Microsoft OneDrive\n   \\ &quot;onedrive&quot;\n27 \/ OpenDrive\n   \\ &quot;opendrive&quot;\n28 \/ OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)\n   \\ &quot;swift&quot;\n29 \/ Pcloud\n   \\ &quot;pcloud&quot;\n30 \/ Put.io\n   \\ &quot;putio&quot;\n31 \/ QingCloud Object Storage\n   \\ &quot;qingstor&quot;\n32 \/ SSH\/SFTP Connection\n   \\ &quot;sftp&quot;\n33 \/ Sugarsync\n   \\ &quot;sugarsync&quot;\n34 \/ Tardigrade Decentralized Cloud Storage\n   \\ &quot;tardigrade&quot;\n35 \/ Transparently chunk\/split large files\n   \\ &quot;chunker&quot;\n36 \/ Union merges the contents of several upstream fs\n   \\ &quot;union&quot;\n37 \/ Uptobox\n   \\ &quot;uptobox&quot;\n38 \/ Webdav\n   \\ &quot;webdav&quot;\n39 \/ Yandex Disk\n   \\ &quot;yandex&quot;\n40 \/ Zoho\n   \\ &quot;zoho&quot;\n41 \/ http Connection\n   \\ &quot;http&quot;\n42 \/ premiumize.me\n   \\ &quot;premiumizeme&quot;\n43 \/ seafile\n   \\ &quot;seafile&quot;\nStorage&gt; 26<\/code><\/pre>\n<p>\u63a5\u7740<code>client_id<\/code>\u548c<code>client_secret<\/code>\u76f4\u63a5\u4e0d\u586b\u56de\u8f66<br \/>\n<code>Edit advanced config?<\/code>\u8f93\u5165<code>n<\/code>\u56de\u8f66<br \/>\n<code>Already have a token - refresh? <\/code>\u8f93\u5165<code>y<\/code>\u56de\u8f66\uff0c\u540e\u9762VPS\u91cc\u914d\u7f6e\u65f6\u662f\u6ca1\u6709\u8fd9\u4e2a\u63d0\u793a\u7684\uff0c\u4f1a\u51fa\u73b0\u4e0b\u4e2a\u81ea\u52a8\u914d\u7f6e\u9009\u9879\uff0c\u522b\u624b\u5feb\u76f4\u63a5<code>y<\/code><br \/>\n<code>Use auto config?<\/code>\u8fd9\u91cc\u8f93\u5165<code>y<\/code>\u56de\u8f66\uff0c\u540e\u9762VPS\u914d\u7f6e\u65f6\u8fd9\u6b65\u8981\u9009 n<br \/>\n\u5177\u4f53\u64cd\u4f5c\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-txt\">Microsoft App Client Id\nLeave blank normally.\nEnter a string value. Press Enter for the default (&quot;&quot;).\nclient_id&gt;\nMicrosoft App Client Secret\nLeave blank normally.\nEnter a string value. Press Enter for the default (&quot;&quot;).\nclient_secret&gt;\nEdit advanced config? (y\/n) \ny) Yes\nn) No\ny\/n&gt; n\nRemote config \nAlready have a token - refresh?  \ny) Yes\nn) No\ny\/n&gt; y\nUse auto config?  \n * Say Y if not sure\n * Say N if you are working on a remote or headless machine\ny) Yes\nn) No\ny\/n&gt; y<\/code><\/pre>\n<p>\u63a5\u7740\u6d4f\u89c8\u5668\u4f1a\u81ea\u52a8\u5f39\u51fa\u7a97\u53e3\uff0c\u7136\u540e\u767b\u5f55\u4f60\u8981\u6302\u8f7d\u7684OneDrive\u8d26\u53f7\uff0c\u5f81\u6c42\u8bb8\u53ef\u63a5\u53d7\u5c31\u884c\u4e86<br \/>\n\u6388\u6743\u6210\u529f\u540e\u8fd4\u56decmd\u7a97\u53e3\u51fa\u73b0\u4ee5\u4e0b\u754c\u9762\uff0c\u8fd9\u91cc\u9009<code>1<\/code>\u56de\u8f66\u3002<\/p>\n<pre><code class=\"language-txt\">Choose a number from below, or type in an existing value\n 1 \/ OneDrive Personal or Business  #\u4e2a\u4eba\u548c\u5546\u7528\n   \\ &quot;onedrive&quot;\n 2 \/ Root Sharepoint site\n   \\ &quot;sharepoint&quot;\n 3 \/ Type in driveID\n   \\ &quot;driveid&quot;\n 4 \/ Type in SiteID\n   \\ &quot;siteid&quot;\n 5 \/ Search a Sharepoint site\n   \\ &quot;search&quot;\nYour choice&gt;1<\/code><\/pre>\n<p>\u63d0\u793a\u627e\u5230\u4e00\u4e2a\u9a71\u52a8\u5668\uff0c\u8ba9\u4f60\u9009\u62e9\uff0c\u8fd9\u91cc\u5c31\u4e00\u4e2a\u9009\u9879 0\uff0c\u90a3\u5c31\u586b\u5165<code>0<\/code>\u56de\u8f66\uff0c\u7136\u540e\u95ee\u4f60\u662f\u5426\u786e\u5b9a\uff0c\u9009<code>y<\/code>\u56de\u8f66\u3002<\/p>\n<pre><code class=\"language-txt\">Found 1 drives, please select the one you want to use:\n0: OneDrive (business) id=huioaeuiaeagioioieuiaaefe@#%gaege94#\nChose drive to use:&gt;0\nFound drive &#039;root&#039; of type &#039;business&#039;, URL:https:\/\/jxjjxy-my.sharepoint.com\/personal\/meeaghvp_t_odmail_cn\/Documents\nIs that okay?\ny) Yes\nn) No\ny\/n&gt; y<\/code><\/pre>\n<p>\u63a5\u7740\u4f1a\u51fa\u73b0\u4e00\u4e32\u957f\u4ee4\u724c\uff0cPC\u7aef\u7684\u64cd\u4f5c\u5168\u662f\u4e3a\u4e86\u8fd9\u4e2a\u4ee4\u724c\uff0c\u5c06\u4e0b\u56fe\u7ea2\u6846\u5185\u7684\u6574\u4e2a\u590d\u5236\uff0c\u590d\u5236\u8303\u56f4<code>{&quot;access_token&quot;:\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u20262019-04-21T16:41:25.1595637+08:00&quot;}<\/code>\u4fdd\u5b58\u597d\uff0c\u4ee5\u540e\u5c31\u53ef\u4ee5\u7701\u4e86\u8fd9\u6b65PC\u7aef\u64cd\u4f5c\uff0c\u4e0b\u9762\u5c31\u56de\u5230SSH\u64cd\u4f5c\u3002<\/p>\n<h3>2 \u3001VPS\u5b89\u88c5Rclone<\/h3>\n<pre><code class=\"language-ssh\">curl https:\/\/rclone.org\/install.sh | sudo bash  #\u5b89\u88c5Rclone\nrclone config  #\u914d\u7f6eRclone<\/code><\/pre>\n<p>\u4e0a\u9762\u8f93\u5165\u5b8c<code>rclone config<\/code>\u56de\u8f66\u540e\u7684\u8fc7\u7a0b\u8ddf\u524d\u9762\u5728PC\u7aef\u7684\u914d\u7f6e\u6b65\u9aa4\u57fa\u672c\u4e00\u6837\uff0c\u8fd9\u91cc\u5c31\u4e0d\u590d\u8ff0\u4e86\uff0c\u5230\u4e86<code>Use auto config?<\/code>\u95ee\u4f60\u662f\u5426\u4f7f\u7528\u81ea\u52a8\u914d\u7f6e\u8fd9\u6b65\u4e0d\u540c\uff0c\u8fd9\u91cc\u9009<code>n<\/code>\u56de\u8f66\uff0c\u7136\u540e\u5728\u51fa\u73b0\u7684<code>result<\/code>\u540e\u9762\u7c98\u8d34\u4e0a\u524d\u9762\u83b7\u5f97\u7684token\u7136\u540e\u56de\u8f66\uff0c\u63a5\u7740\u4f1a\u6709\u51e0\u4e2a\u786e\u8ba4\uff0c\u6309\u63d0\u793a\u586b<code>y<\/code>\u5c31\u884c\uff0c\u76f4\u5230\u53c8\u56de\u5230\u4e0b\u56fe\u914d\u7f6e\u5f00\u5934\u754c\u9762\uff0c\u8f93\u5165<code>q<\/code>\u56de\u8f66\u9000\u51fa\u914d\u7f6e\u5373\u53ef\uff0c\u5230\u6b64\u6211\u4eec\u5b8c\u6210\u4e86\u7f51\u76d8\u7684\u6388\u6743\u3002<\/p>\n<pre><code class=\"language-ssh\">Name                 Type\n====                 ====\nonedrive             onedrive\n\ne) Edit existing remote\nn) New remote\nd) Delete remote\nr) Rename remote\nc) Copy remote\ns) Set configuration password\nq) Quit config\ne\/n\/d\/r\/c\/s\/q&gt; q<\/code><\/pre>\n<p>\u63d0\u793a:<br \/>\n\u4ee5\u4e0a\u4e24\u6b65\u5c31\u662f\u4e3a\u4e86\u5f97\u5230token\uff0c\u5e76\u5728VPS\u91cc\u521b\u5efa\u4e00\u4e2a<code>rclone.conf<\/code>\u914d\u7f6e\u6587\u4ef6\uff0c\u8be5\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55\u5728<code>root\/.config\/rclone\/rclone.conf<\/code>\uff0c\u53ef\u4ee5\u5c06\u8fd9\u4e2a\u6587\u4ef6\u4e0b\u8f7d\u5230\u672c\u5730\uff0c\u4ee5\u540e\u5982\u679c\u91cd\u88c5\u53ea\u8981\u5728VPS\u4e0a\u5b89\u88c5\u597drclone\uff0c\u518d\u5c06\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u653e\u8fdb\u8fd9\u4e2a\u76ee\u5f55\u5373\u53ef\uff0c\u7701\u53bb\u7e41\u7410\u914d\u7f6e\u8fc7\u7a0b\u3002<\/p>\n<h3>3\u3001\u81ea\u52a8\u4e0a\u4f20\u8bbe\u7f6e<\/h3>\n<p>\u56e0\u4e3a\u6302\u8f7d\u4e86\u5176\u5b9e\u6700\u7ec8\u7684\u76ee\u7684\u8fd8\u662f\u8f6c\u79fb\u5230\u81ea\u5df1\u7684\u4e91\u76d8\u7a7a\u95f4\u4e2d\uff0cvps \u7684\u786c\u76d8\u80fd\u6709\u591a\u5927\uff0c\u8981\u6298\u817e\u90fd\u662f\u5728\u4e91\u76d8\u4e2d\u3002\u5982\u679c\u4f60\u662f\u571f\u8c6a\u5f53\u6211\u6ca1\u8bf4\u3002<br \/>\n\u8fd9\u7bc7\u624b\u8bb0\u662f\u89e3\u51b3\u540e\u7eed\u5229\u7528 rclone \u81ea\u52a8\u4e0a\u4f20 aria2 \u4e0b\u8f7d\u7684\u6587\u4ef6\u5230 onedrive \u6216\u8005 googledrive\u3002\u5230 aria2 \u7684\u76ee\u5f55\u521b\u5efa\u811a\u672c\uff1a<\/p>\n<pre><code class=\"language-ssh\">vi autoupload.sh<\/code><\/pre>\n<p>\u811a\u672c\u5982\u4e0b[github]P3TERX\/aria2.conf[\/github]\uff1a<\/p>\n<pre><code class=\"language-txt\">#!\/bin\/bash\n#=================================================\n# Description: Aria2 download completes calling Rclone upload\n# Lisence: MIT\n# Version: 1.8\n# Author: P3TERX\n# Blog: https:\/\/p3terx.com\n#=================================================\n\ndownloadpath=&#039;\/usr\/local\/caddy\/www\/file&#039; #Aria2\u4e0b\u8f7d\u76ee\u5f55\nname=&#039;remote&#039; #\u914d\u7f6eRclone\u65f6\u586b\u5199\u7684name\nfolder=&#039;\/backup&#039; #\u7f51\u76d8\u91cc\u7684\u6587\u4ef6\u5939\uff0c\u7559\u7a7a\u4e3a\u6574\u4e2a\u7f51\u76d8\u3002\nretry_num=3 #\u4e0a\u4f20\u5931\u8d25\u91cd\u8bd5\u6b21\u6570\n\n#=================\u4e0b\u9762\u4e0d\u9700\u8981\u4fee\u6539===================\nfilepath=$3 #Aria2\u4f20\u9012\u7ed9\u811a\u672c\u7684\u6587\u4ef6\u8def\u5f84\u3002BT\u4e0b\u8f7d\u6709\u591a\u4e2a\u6587\u4ef6\u65f6\u8be5\u503c\u4e3a\u6587\u4ef6\u5939\u5185\u7b2c\u4e00\u4e2a\u6587\u4ef6\uff0c\u5982\/root\/Download\/a\/b\/1.mp4\nrdp=${filepath#${downloadpath}\/} #\u8def\u5f84\u8f6c\u6362\uff0c\u53bb\u6389\u5f00\u5934\u7684\u4e0b\u8f7d\u8def\u5f84\u3002\npath=${downloadpath}\/${rdp%%\/*} #\u8def\u5f84\u8f6c\u6362\u3002\u4e0b\u8f7d\u6587\u4ef6\u5939\u65f6\u4e3a\u9876\u5c42\u6587\u4ef6\u5939\u8def\u5f84\uff0c\u666e\u901a\u5355\u6587\u4ef6\u4e0b\u8f7d\u65f6\u4e0e\u6587\u4ef6\u8def\u5f84\u76f8\u540c\u3002\n\nTask_INFO(){\necho\necho -e &quot;[\\033[1;32mUPLOAD\\033[0m] Task information:&quot;\necho -e &quot;\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2013 [\\033[1;33mINFO\\033[0m] \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2013&quot;\necho -e &quot;\\033[1;35mDownload path\uff1a\\033[0m${downloadpath}&quot;\necho -e &quot;\\033[1;35mFile path: \\033[0m${filepath}&quot;\necho -e &quot;\\033[1;35mUpload path: \\033[0m${uploadpath}&quot;\necho -e &quot;\\033[1;35mRemote path\uff1a\\033[0m${remotepath}&quot;\necho -e &quot;\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2013 [\\033[1;33mINFO\\033[0m] \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2013&quot;\necho\n}\n\nUpload(){\nretry=0\nwhile [ $retry -le $retry_num -a -e &quot;${uploadpath}&quot; ]; do\n[ $retry != 0 ] &amp;&amp; echo &amp;&amp; echo -e &quot;Upload failed! Retry ${retry}\/${retry_num} \u2026&quot; &amp;&amp; echo\nrclone move -v &quot;${uploadpath}&quot; &quot;${remotepath}&quot;\nrclone rmdirs -v &quot;${downloadpath}&quot; \u2013leave-root\nretry=$(($retry+1))\ndone\n[ -e &quot;${uploadpath}&quot; ] &amp;&amp; echo &amp;&amp; echo -e &quot;Upload failed: ${uploadpath}&quot; &amp;&amp; echo\n[ -e &quot;${path}&quot;.aria2 ] &amp;&amp; rm -vf &quot;${path}&quot;.aria2\n[ -e &quot;${filepath}&quot;.aria2 ] &amp;&amp; rm -vf &quot;${filepath}&quot;.aria2\n}\n\nif [ $2 -eq 0 ]\nthen\nexit 0\nfi\n\necho &amp;&amp; echo -e &quot; \\033[1;33mU P L O A D ! ! !\\033[0m&quot; &amp;&amp; echo\necho &amp;&amp; echo -e &quot; \\033[1;32mU P L O A D ! ! !\\033[0m&quot; &amp;&amp; echo\necho &amp;&amp; echo -e &quot; \\033[1;35mU P L O A D ! ! !\\033[0m&quot; &amp;&amp; echo\n\nif [ &quot;$path&quot; = &quot;$filepath&quot; ] &amp;&amp; [ $2 -eq 1 ] #\u666e\u901a\u5355\u6587\u4ef6\u4e0b\u8f7d\uff0c\u79fb\u52a8\u6587\u4ef6\u5230\u8bbe\u5b9a\u7684\u7f51\u76d8\u6587\u4ef6\u5939\u3002\nthen\nuploadpath=${filepath}\nremotepath=&quot;${name}:${folder}&quot;\nTask_INFO\nUpload\nexit 0\nelif [ &quot;$path&quot; != &quot;$filepath&quot; ] &amp;&amp; [ $2 -gt 1 ] #BT\u4e0b\u8f7d\uff08\u6587\u4ef6\u5939\u5185\u6587\u4ef6\u6570\u5927\u4e8e1\uff09\uff0c\u79fb\u52a8\u6574\u4e2a\u6587\u4ef6\u5939\u5230\u8bbe\u5b9a\u7684\u7f51\u76d8\u6587\u4ef6\u5939\u3002\nthen\nuploadpath=${path}\nremotepath=&quot;${name}:${folder}\/${rdp%%\/*}&quot;\nTask_INFO\nUpload\nexit 0\nelif [ &quot;$path&quot; != &quot;$filepath&quot; ] &amp;&amp; [ $2 -eq 1 ] #\u7b2c\u4e09\u65b9\u5ea6\u76d8\u5de5\u5177\u4e0b\u8f7d\uff08\u5b50\u6587\u4ef6\u5939\u6216\u591a\u7ea7\u76ee\u5f55\u7b49\u60c5\u51b5\u4e0b\u7684\u5355\u6587\u4ef6\u4e0b\u8f7d\uff09\u3001BT\u4e0b\u8f7d\uff08\u6587\u4ef6\u5939\u5185\u6587\u4ef6\u6570\u7b49\u4e8e1\uff09\uff0c\u79fb\u52a8\u6587\u4ef6\u5230\u8bbe\u5b9a\u7684\u7f51\u76d8\u6587\u4ef6\u5939\u4e0b\u7684\u76f8\u540c\u8def\u5f84\u6587\u4ef6\u5939\u3002\nthen\nuploadpath=${filepath}\nremotepath=&quot;${name}:${folder}\/${rdp%\/*}&quot;\nTask_INFO\nUpload\nexit 0\nfi\nTask_INFO<\/code><\/pre>\n<p>\u9700\u8981\u4fee\u6539\u7684\u5730\u65b9\u53ea\u6709\u8fd9\u4e09\u884c\uff1a<\/p>\n<pre><code class=\"language-txt\">downloadpath=&#039;\/usr\/local\/caddy\/www\/file&#039; #Aria2\u4e0b\u8f7d\u76ee\u5f55\nname=&#039;remote&#039; #\u914d\u7f6eRclone\u65f6\u586b\u5199\u7684name\nfolder=&#039;\/backup&#039; #\u7f51\u76d8\u91cc\u7684\u6587\u4ef6\u5939\uff0c\u7559\u7a7a\u4e3a\u6574\u4e2a\u7f51\u76d8\u3002<\/code><\/pre>\n<p><code>\/usr\/local\/caddy\/www\/file<\/code>\u8fd9\u4e2a\u5bf9\u5e94\u4f60aria2\u7684\u4e0b\u8f7d\u76ee\u5f55\uff08\u6bd4\u5982\u7528\u6211\u4eec\u7684\u7684\u589e\u5f3a\u811a\u672c\u5c31\u662f<code>\/root\/downloads<\/code>\uff09\uff0c<code>remote<\/code> \u5bf9\u5e94\u4f60\u914d\u7f6erclone\u7684\u65f6\u5019\u8bbe\u7f6e\u7684\u540d\u79f0\uff0c<code>\/backup<\/code> \u5bf9\u5e94\u4f60\u60f3\u540c\u6b65\u4e0a\u4f20\u5230\u4f60\u7f51\u76d8\u7684\u54ea\u4e2a\u76ee\u5f55\uff0c\u5982\u679c\u7559\u7a7a\u5c31\u662f\u6839\u76ee\u5f55\uff08\u5982\u679c\u6ca1\u6709\u8fd9\u4e2a\u76ee\u5f55\uff0c\u4f1a\u81ea\u52a8\u521b\u5efa\uff09\u3002<br \/>\n\u4fee\u6539\u5b8c\u6bd5\u540e\uff0c\u7ed9\u8fd9\u4e2a\u811a\u672c\u6267\u884c\u6743\u9650\uff1a<\/p>\n<pre><code class=\"language-ssh\">chmod +x autoupload.sh<\/code><\/pre>\n<p>\u7136\u540e\u7f16\u8f91aria2\u7684\u914d\u7f6e\u6587\u4ef6\uff08\u4f4d\u7f6e\u5728<code>\/root\/.aria2c<\/code>\uff09\uff0c\u627e\u5230<code>on-download-complete<\/code>\uff0c\u4fee\u6539\u5185\u5bb9\u4e3a\u8fd9\u53e5\uff1a<\/p>\n<pre><code class=\"language-txt\"># \u8c03\u7528 rclone \u4e0a\u4f20(move)\u5230\u7f51\u76d8\non-download-complete=\/root\/.aria2c\/autoupload.sh<\/code><\/pre>\n<p>\u8fd9\u5c31\u662f\u5229\u7528rclone\u7684on-download-complete\u81ea\u52a8\u4e0a\u4f20aria2\u4e0b\u8f7d\u597d\u7684\u6587\u4ef6\u3002<br \/>\n\u91cd\u65b0\u542f\u52a8aria2\uff1a<\/p>\n<pre><code class=\"language-ssh\">\/etc\/init.d\/aria2 restart<\/code><\/pre>\n<p>\u91cd\u542fAria2\u4f7f\u914d\u7f6e\u6587\u4ef6\u751f\u6548\uff0c\u8fd9\u6837\u5c31\u5927\u529f\u544a\u6210\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u4f5c\u8005\u94fe\u63a5 \u5b89\u88c5Aria2\u589e\u5f3a\u7248 \u4e3a\u4e86\u907f\u514d\u51fa\u9519\uff0c\u5b89\u88c5\u4e0b\u9762\u7684\u57fa\u7840\u7ec4\u4ef6\uff1a apt install sudo wget curl ca- &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[4,5],"tags":[70,69],"class_list":["post-741","post","type-post","status-publish","format-standard","hentry","category-4","category-5","tag-aria2","tag-rclone"],"_links":{"self":[{"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/posts\/741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/comments?post=741"}],"version-history":[{"count":1,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/posts\/741\/revisions"}],"predecessor-version":[{"id":928,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/posts\/741\/revisions\/928"}],"wp:attachment":[{"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/media?parent=741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/categories?post=741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/tags?post=741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}