{"id":95,"date":"2020-08-10T20:19:22","date_gmt":"2020-08-10T20:19:22","guid":{"rendered":"http:\/\/blog.kimi.pw\/?p=95"},"modified":"2022-10-17T16:24:25","modified_gmt":"2022-10-17T16:24:25","slug":"rclone-%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b-%e6%8c%82%e8%bd%bd-onedrive%e3%80%81google-drive-%e7%ad%89%e7%bd%91%e7%9b%98linux","status":"publish","type":"post","link":"https:\/\/blog.kimi.ee\/?p=95","title":{"rendered":"\u3010\u7f51\u76d8\u3011Rclone \u4f7f\u7528\u6559\u7a0b &#8211; \u6302\u8f7d OneDrive\u3001Google Drive \u7b49\u7f51\u76d8(Linux)"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_62 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >\u3010 \u76ee \u5f55 \u3011 -  \u70b9\u51fb\u4e0b\u65b9\u6807\u9898\u8df3\u8f6c <\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #cecece;color:#cecece\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #cecece;color:#cecece\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blog.kimi.ee\/?p=95\/#%E5%89%8D%E8%A8%80\" title=\"\u524d\u8a00\">\u524d\u8a00<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blog.kimi.ee\/?p=95\/#%E5%AE%89%E8%A3%85%E5%92%8C%E9%85%8D%E7%BD%AE_Rclone\" title=\"\u5b89\u88c5\u548c\u914d\u7f6e Rclone\">\u5b89\u88c5\u548c\u914d\u7f6e Rclone<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blog.kimi.ee\/?p=95\/#%E5%AE%89%E8%A3%85_fuse\" title=\"\u5b89\u88c5 fuse\">\u5b89\u88c5 fuse<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blog.kimi.ee\/?p=95\/#%E6%8C%82%E8%BD%BD%E7%BD%91%E7%9B%98\" title=\"\u6302\u8f7d\u7f51\u76d8\">\u6302\u8f7d\u7f51\u76d8<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/blog.kimi.ee\/?p=95\/#%E6%89%8B%E5%8A%A8%E6%8C%82%E8%BD%BD\" title=\"\u624b\u52a8\u6302\u8f7d\">\u624b\u52a8\u6302\u8f7d<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/blog.kimi.ee\/?p=95\/#%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B\" title=\"\u4f7f\u7528\u793a\u4f8b\">\u4f7f\u7528\u793a\u4f8b<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/blog.kimi.ee\/?p=95\/#%E5%BC%80%E6%9C%BA%E8%87%AA%E5%8A%A8%E6%8C%82%E8%BD%BD\" title=\"\u5f00\u673a\u81ea\u52a8\u6302\u8f7d\">\u5f00\u673a\u81ea\u52a8\u6302\u8f7d<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/blog.kimi.ee\/?p=95\/#%E7%AE%A1%E7%90%86\" title=\"\u7ba1\u7406\">\u7ba1\u7406<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/blog.kimi.ee\/?p=95\/#%E5%8D%B8%E8%BD%BD%E8%87%AA%E5%90%AF%E6%8C%82%E8%BD%BD\" title=\"\u5378\u8f7d\u81ea\u542f\u6302\u8f7d\">\u5378\u8f7d\u81ea\u542f\u6302\u8f7d<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/blog.kimi.ee\/?p=95\/#%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99\" title=\"\u53c2\u8003\u8d44\u6599\">\u53c2\u8003\u8d44\u6599<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"toc_0\"><span class=\"ez-toc-section\" id=\"%E5%89%8D%E8%A8%80\"><\/span>\u524d\u8a00<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Rclone \u662f\u4e00\u4e2a\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u652f\u6301\u5728\u4e0d\u540c\u5bf9\u8c61\u5b58\u50a8\u3001\u7f51\u76d8\u95f4\u540c\u6b65\u3001\u4e0a\u4f20\u3001\u4e0b\u8f7d\u6570\u636e\u3002\u5e76\u4e14\u901a\u8fc7\u4e00\u4e9b\u8bbe\u7f6e\u53ef\u4ee5\u5b9e\u73b0\u79bb\u7ebf\u4e0b\u8f7d\u3001\u670d\u52a1\u5668\u5907\u4efd\u7b49\u975e\u5e38\u5b9e\u7528\u7684\u529f\u80fd\u3002Rclone \u6709\u5f88\u591a\u79cd\u4f7f\u7528\u65b9\u5f0f\uff0c\u6302\u8f7d\u662f\u5176\u4e2d\u7684\u4e00\u79cd\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong>\u53cb\u60c5\u63d0\u793a\uff1a<\/strong>&nbsp;\u6302\u8f7d\u8fd9\u4e2a\u64cd\u4f5c\u5e76\u4e0d\u662f\u5fc5\u987b\u7684\uff0c\u4f5c\u4e3a\u4e00\u4e2a\u5b9e\u9a8c\u6027\u529f\u80fd\u5b83\u6709\u5f88\u591a\u5c40\u9650\u6027\u548c\u95ee\u9898\u3002\u6302\u8f7d\u540e\u5e76\u4e0d\u80fd\u5f53\u505a\u4e00\u4e2a\u771f\u6b63\u7684\u78c1\u76d8\u6765\u4f7f\u7528\uff0c\u5728\u8fdb\u884c\u6587\u4ef6\u64cd\u4f5c\u65f6\u4f1a\u4f7f\u7528\u672c\u5730\u78c1\u76d8\u8fdb\u884c\u7f13\u5b58\uff0c\u5373\u5360\u7528\u672c\u5730\u78c1\u76d8\u7a7a\u95f4\u3002\u4f7f\u7528\u4e0d\u5f53\u8fd8\u53ef\u80fd\u9020\u6210\u78c1\u76d8\u5199\u6ee1\u3001VPS\u5361\u6b7b\u7b49\u95ee\u9898\u3002\u5728 Google \u4e0a\u641c\u7d22\u201cRclone\u201d\uff0c\u4e0e\u4e4b\u76f8\u5173\u7684\u6700\u591a\u7684\u5173\u952e\u8bcd\u5c31\u662f\u201c\u6302\u8f7d\u201d\uff0c\u8fd9\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u5bf9\u5f88\u591a\u521a\u63a5\u89e6\u7684\u5c0f\u4f19\u4f34\u9020\u6210\u4e86\u8bef\u5bfc\u3002\u8981\u7a33\u5b9a\u7684\u8fdb\u884c\u4e0a\u4f20\u3001\u4e0b\u8f7d\u3001\u540c\u6b65\u7b49\u64cd\u4f5c\u5efa\u8bae\u4f7f\u7528 Rclone \u7684\u539f\u751f\u547d\u4ee4\u529f\u80fd\uff0c\u4f7f\u7528\u65b9\u6cd5\u53c2\u89c1\u300a<a href=\"https:\/\/p3terx.com\/archives\/rclone-advanced-user-manual-common-command-parameters.html\" target=\"_blank\" rel=\"noreferrer noopener\">Rclone \u8fdb\u9636\u4f7f\u7528\u6559\u7a0b &#8211; \u5e38\u7528\u547d\u4ee4\u53c2\u6570<\/a>\u300b\u3002<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"toc_1\"><span class=\"ez-toc-section\" id=\"%E5%AE%89%E8%A3%85%E5%92%8C%E9%85%8D%E7%BD%AE_Rclone\"><\/span>\u5b89\u88c5\u548c\u914d\u7f6e Rclone<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u5b98\u65b9\u63d0\u4f9b\u4e86<a href=\"https:\/\/p3terx.com\/go\/aHR0cHM6Ly9yY2xvbmUub3JnL2luc3RhbGwvI3NjcmlwdC1pbnN0YWxsYXRpb24=\" target=\"_blank\" rel=\"noreferrer noopener\">\u4e00\u952e\u5b89\u88c5\u811a\u672c<\/a>\uff1a<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\"><code>curl https:\/\/rclone.org\/install.sh | sudo bash<\/code><\/pre><\/div>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u540e\uff0c\u8f93\u5165&nbsp;<code>rclone config<\/code>&nbsp;\u547d\u4ee4\u8fdb\u5165\u4ea4\u4e92\u5f0f\u914d\u7f6e\u9009\u9879\uff0c\u6309\u7167\u63d0\u793a\u4e00\u6b65\u4e00\u6b65\u6765\u8fdb\u884c\u64cd\u4f5c\u5373\u53ef\u3002\u5982\u679c\u4f60\u4e00\u8138\u61f5\u903c\uff0c\u53ef\u4ee5\u53bb\u770b\u300a<a href=\"https:\/\/p3terx.com\/archives\/rclone-installation-and-configuration-tutorial.html\" target=\"_blank\" rel=\"noreferrer noopener\">Rclone \u5b89\u88c5\u914d\u7f6e\u6559\u7a0b<\/a>\u300b\u6765\u4e86\u89e3\u914d\u7f6e\u7684\u8be6\u7ec6\u8fc7\u7a0b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"toc_2\"><span class=\"ez-toc-section\" id=\"%E5%AE%89%E8%A3%85_fuse\"><\/span>\u5b89\u88c5 fuse<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u6302\u8f7d\u9700\u8981\u5b89\u88c5 fuse\uff0c\u6839\u636e\u81ea\u5df1\u7684\u7cfb\u7edf\u6765\u9009\u62e9\u5b89\u88c5\u547d\u4ee4\uff1a<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\"><code># Debian\/Ubantu\napt-get update && apt-get install -y fuse\n# CentOS\nyum install -y fuse<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"toc_3\"><span class=\"ez-toc-section\" id=\"%E6%8C%82%E8%BD%BD%E7%BD%91%E7%9B%98\"><\/span>\u6302\u8f7d\u7f51\u76d8<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u6302\u8f7d\u7f51\u76d8\u5206\u4e3a\u624b\u52a8\u6302\u8f7d\u548c\u5f00\u673a\u81ea\u52a8\u6302\u8f7d\uff0c\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u6765\u9009\u62e9\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc_4\"><span class=\"ez-toc-section\" id=\"%E6%89%8B%E5%8A%A8%E6%8C%82%E8%BD%BD\"><\/span>\u624b\u52a8\u6302\u8f7d<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\"><code>#\u6302\u8f7d\nrclone mount &lt;\u7f51\u76d8\u540d\u79f0:\u7f51\u76d8\u8def\u5f84&gt; &lt;\u672c\u5730\u8def\u5f84&gt; [\u53c2\u6570] --daemon\n#\u53d6\u6d88\u6302\u8f7d\nfusermount -qzu &lt;\u672c\u5730\u8def\u5f84&gt;<\/code><\/pre><\/div>\n\n\n\n<p><code>\u7f51\u76d8\u540d\u79f0<\/code>\u4e3a\u914d\u7f6e\u65f6\u586b\u7684&nbsp;<code>name<\/code>\uff0c<code>\u7f51\u76d8\u8def\u5f84<\/code>\u4e3a\u7f51\u76d8\u91cc\u7684\u6587\u4ef6\u5939\uff0c\u7559\u7a7a\u4e3a\u6574\u4e2a\u7f51\u76d8\uff0c<code>\u672c\u5730\u8def\u5f84<\/code>\u4e3a VPS \u4e0a\u7684\u672c\u5730\u6587\u4ef6\u5939\u3002<code>\u53c2\u6570<\/code>\u53ef\u4ee5\u67e5\u770b<a href=\"https:\/\/p3terx.com\/go\/aHR0cHM6Ly9yY2xvbmUub3JnL2NvbW1hbmRzL3JjbG9uZV9tb3VudC8=\" target=\"_blank\" rel=\"noreferrer noopener\">\u5b98\u65b9\u6587\u6863<\/a>\u6839\u636e\u9700\u6c42\u8fdb\u884c\u9009\u62e9\u3002\u5b9e\u9645\u8f93\u5165\u65f6\u4e0d\u8981\u6709\u62ec\u53f7\uff0c\u8fd9\u91cc\u53ea\u662f\u4e3a\u4e86\u66f4\u6e05\u695a\u7684\u533a\u5206\u3002<code>--daemon<\/code>&nbsp;\u4e3a\u8fdb\u7a0b\u5b88\u62a4\u53c2\u6570\uff0c\u53ef\u540e\u53f0\u8fd0\u884c\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"toc_5\"><span class=\"ez-toc-section\" id=\"%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B\"><\/span>\u4f7f\u7528\u793a\u4f8b<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>\u8f93\u5165\u547d\u4ee4\u8fdb\u884c\u6302\u8f7d\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\"><code>rclone mount onedrive:\/ \/onedrive --copy-links --allow-other --allow-non-empty --umask 000 --daemon<\/code><\/pre><\/div>\n\n\n\n<p>\u7136\u540e\u8f93\u5165&nbsp;<code>df -h<\/code>&nbsp;\u547d\u4ee4\u67e5\u770b\u6302\u8f7d\u60c5\u51b5\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\"><code>root@P3TERX:~# df -h\nFilesystem      Size  Used Avail Use% Mounted on\nudev            286M     0  286M   0% \/dev\ntmpfs            60M  7.8M   52M  14% \/run\n\/dev\/sda1        99G   25G   71G  26% \/\ntmpfs           297M   24K  297M   1% \/dev\/shm\ntmpfs           5.0M     0  5.0M   0% \/run\/lock\ntmpfs           297M     0  297M   0% \/sys\/fs\/cgroup\nOnedrive:       5.0T  216G  4.8T   5% \/Onedrive #\u8fd9\u4e2a\u5c31\u662f\u6302\u8f7d\u7684\u7f51\u76d8<\/code><\/pre><\/div>\n\n\n\n<p>\u53d6\u6d88\u6302\u8f7d\uff1a<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\"><code>fusermount -qzu \/Onedrive<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc_6\"><span class=\"ez-toc-section\" id=\"%E5%BC%80%E6%9C%BA%E8%87%AA%E5%8A%A8%E6%8C%82%E8%BD%BD\"><\/span>\u5f00\u673a\u81ea\u52a8\u6302\u8f7d<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul><li>\u4e0b\u8f7d\u5e76\u7f16\u8f91\u81ea\u542f\u811a\u672c<\/li><\/ul>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\"><code>wget -N git.io\/rcloned && nano rcloned\n\n\n\u6216\uff1a\n\u5728 \/etc\/init.d\u4e0b\u65b0\u5efa\u4e00\u4e2arcloned\u7684\u6587\u4ef6\uff0c\u590d\u5236\u4ee5\u4e0b\u5185\u5bb9\uff1a\n\n#!\/bin\/bash\n\nPATH=\/bin:\/sbin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/bin:\/usr\/local\/sbin:~\/bin\nexport PATH\nNAME_BIN=&quot;rclone&quot;\n### BEGIN INIT INFO\n# Provides:          rclone\n# Required-Start:    $all\n# Required-Stop:     $all\n# Default-Start:     2 3 4 5\n# Default-Stop:      0 1 6\n# Short-Description: Start rclone at boot time\n# Description:       Enable rclone by daemon.\n### END INIT INFO\n\nNAME=&quot;onedrive&quot; #Rclone\u914d\u7f6e\u65f6\u586b\u5199\u7684name\nREMOTE=&#39;&#39;  #\u8fdc\u7a0b\u6587\u4ef6\u5939\uff0c\u7f51\u76d8\u91cc\u7684\u6302\u8f7d\u7684\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u7559\u7a7a\u4e3a\u6574\u4e2a\u7f51\u76d8\nLOCAL=&#39;\/onedrive&#39;  #\u6302\u8f7d\u5730\u5740\uff0cVPS\u672c\u5730\u6302\u8f7d\u76ee\u5f55\nLOG=&quot;\/$HOME\/.rclone\/rcloned.log&quot;\n\nGreen_font_prefix=&quot;\\033[32m&quot; && Red_font_prefix=&quot;\\033[31m&quot; && Green_background_prefix=&quot;\\033[42;37m&quot; && Red_background_prefix=&quot;\\033[41;37m&quot; && Font_color_suffix=&quot;\\033[0m&quot;\nInfo=&quot;${Green_font_prefix}[\u4fe1\u606f]${Font_color_suffix}&quot;\nError=&quot;${Red_font_prefix}[\u9519\u8bef]${Font_color_suffix}&quot;\nRETVAL=0\n\ncheck_running(){\n\tPID=&quot;$(ps -C $NAME_BIN -o pid= |head -n1 |grep -o &#39;[0-9]\\{1,\\}&#39;)&quot;\n\tif [[ ! -z ${PID} ]]; then\n\t\treturn 0\n\telse\n\t\treturn 1\n\tfi\n}\ndo_start(){\n\tcheck_running\n\tif [[ $? -eq 0 ]]; then\n\t\techo -e &quot;${Info} $NAME_BIN (PID ${PID}) \u6b63\u5728\u8fd0\u884c...&quot; && exit 0\n\telse\n\t\tfusermount -zuq $LOCAL &gt;\/dev\/null 2&gt;&1\n\t\tmkdir -p $LOCAL\n\t\tmkdir -p ${LOG%\/*}\n\t\tsudo \/usr\/bin\/rclone mount -vv $NAME:$REMOTE $LOCAL --copy-links --allow-other --allow-non-empty --umask 000 &gt; &quot;${LOG}&quot; 2&gt;&1 &\n\t\tsleep 2s\n\t\tcheck_running\n\t\tif [[ $? -eq 0 ]]; then\n\t\t\techo -e &quot;${Info} $NAME_BIN \u542f\u52a8\u6210\u529f !&quot;\n\t\telse\n\t\t\techo -e &quot;${Error} $NAME_BIN \u542f\u52a8\u5931\u8d25 !&quot;\n\t\tfi\n\tfi\n}\ndo_stop(){\n\tcheck_running\n\tif [[ $? -eq 0 ]]; then\n\t\tkill -9 ${PID}\n\t\tRETVAL=$?\n\t\tif [[ $RETVAL -eq 0 ]]; then\n\t\t\techo -e &quot;${Info} $NAME_BIN \u505c\u6b62\u6210\u529f !&quot;\n\t\telse\n\t\t\techo -e &quot;${Error} $NAME_BIN \u505c\u6b62\u5931\u8d25 !&quot;\n\t\tfi\n\telse\n\t\techo -e &quot;${Info} $NAME_BIN \u672a\u8fd0\u884c&quot;\n\t\tRETVAL=1\n\tfi\n\tfusermount -zuq $LOCAL &gt;\/dev\/null 2&gt;&1\n}\ndo_status(){\n\tcheck_running\n\tif [[ $? -eq 0 ]]; then\n\t\techo -e &quot;${Info} $NAME_BIN (PID $(echo ${PID})) \u6b63\u5728\u8fd0\u884c...&quot;\n\telse\n\t\techo -e &quot;${Info} $NAME_BIN \u672a\u8fd0\u884c !&quot;\n\t\tRETVAL=1\n\tfi\n}\ndo_restart(){\n\tdo_stop\n\tsleep 2s\n\tdo_start\n}\ncase &quot;$1&quot; in\n\tstart|stop|restart|status)\n\tdo_$1\n\t;;\n\t*)\n\techo &quot;\u4f7f\u7528\u65b9\u6cd5: $0 { start | stop | restart | status }&quot;\n\tRETVAL=1\n\t;;\nesac\nexit $RETVAL\n\n\ufeff<\/code><\/pre><\/div>\n\n\n\n<ul><li>\u4fee\u6539\u5185\u5bb9\uff1a<\/li><\/ul>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\"><code>NAME=&quot;Onedrive&quot; #Rclone\u914d\u7f6e\u65f6\u586b\u5199\u7684name\nREMOTE=&#39;&#39;  #\u8fdc\u7a0b\u6587\u4ef6\u5939\uff0c\u7f51\u76d8\u91cc\u7684\u6302\u8f7d\u7684\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u7559\u7a7a\u4e3a\u6574\u4e2a\u7f51\u76d8\nLOCAL=&#39;\/Onedrive&#39;  #\u6302\u8f7d\u5730\u5740\uff0cVPS\u672c\u5730\u6302\u8f7d\u76ee\u5f55<\/code><\/pre><\/div>\n\n\n\n<ul><li>\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f<\/li><\/ul>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\"><code>mv rcloned \/etc\/init.d\/rcloned\nchmod +x \/etc\/init.d\/rcloned\nupdate-rc.d -f rcloned defaults # Debian\/Ubuntu\nchkconfig rcloned on # CentOS\nbash \/etc\/init.d\/rcloned start<\/code><\/pre><\/div>\n\n\n\n<p>\u770b\u5230&nbsp;<code>[\u4fe1\u606f] rclone \u542f\u52a8\u6210\u529f !<\/code>&nbsp;\u5373\u53ef\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"toc_7\"><span class=\"ez-toc-section\" id=\"%E7%AE%A1%E7%90%86\"><\/span>\u7ba1\u7406<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>\u5f00\u59cb\u6302\u8f7d&nbsp;<code>bash \/etc\/init.d\/rcloned start<\/code><\/p>\n\n\n\n<p>\u505c\u6b62\u6302\u8f7d&nbsp;<code>bash \/etc\/init.d\/rcloned stop<\/code><\/p>\n\n\n\n<p>\u91cd\u65b0\u6302\u8f7d&nbsp;<code>bash \/etc\/init.d\/rcloned restart<\/code><\/p>\n\n\n\n<p>\u67e5\u770b\u65e5\u5fd7&nbsp;<code>tail -f \/$HOME\/.rclone\/rcloned.log<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"toc_8\"><span class=\"ez-toc-section\" id=\"%E5%8D%B8%E8%BD%BD%E8%87%AA%E5%90%AF%E6%8C%82%E8%BD%BD\"><\/span>\u5378\u8f7d\u81ea\u542f\u6302\u8f7d<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism undefined-numbers lang-plane\"><code>bash \/etc\/init.d\/rcloned stop\nupdate-rc.d -f rcloned remove # Debian\/Ubuntu\nchkconfig rcloned off # CentOS\nrm -f \/etc\/init.d\/rcloned<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"toc_9\"><span class=\"ez-toc-section\" id=\"%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99\"><\/span>\u53c2\u8003\u8d44\u6599<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/p3terx.com\/go\/aHR0cHM6Ly9yY2xvbmUub3JnL2NvbW1hbmRzL3JjbG9uZV9tb3VudC8=\" target=\"_blank\" rel=\"noreferrer noopener\">rclone \u5b98\u65b9\u6587\u6863<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/p3terx.com\/go\/aHR0cHM6Ly93d3cubW9lcmF0cy5jb20vYXJjaGl2ZXMvNDkxLw==\" target=\"_blank\" rel=\"noreferrer noopener\">\u5728 Debian\/Ubuntu \u4e0a\u4f7f\u7528 rclone \u6302\u8f7d OneDrive \u7f51\u76d8<\/a><\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong>\u672c\u6587\u4f5c\u8005\uff1a<\/strong><a rel=\"noreferrer noopener\" href=\"https:\/\/p3terx.com\/\" target=\"_blank\">P3TERX<\/a><\/p><p><strong>\u539f\u6587\u94fe\u63a5\uff1a<\/strong><a rel=\"noreferrer noopener\" href=\"https:\/\/p3terx.com\/archives\/linux-vps-uses-rclone-to-mount-network-drives-such-as-onedrive-and-google-drive.html\" target=\"_blank\">https:\/\/p3terx.com\/archives\/linux-vps-uses-rclone-to-mount-network-drives-such-as-onedrive-and-google-drive.html<\/a><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 Rclone \u662f\u4e00\u4e2a\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"\u3010\u7f51\u76d8\u3011Rclone \u4f7f\u7528\u6559\u7a0b &#8211; \u6302\u8f7d OneDrive\u3001Google Drive \u7b49\u7f51\u76d8(Linux)\" class=\"read-more button\" href=\"https:\/\/blog.kimi.ee\/?p=95#more-95\">Read more<span class=\"screen-reader-text\">\u3010\u7f51\u76d8\u3011Rclone \u4f7f\u7528\u6559\u7a0b &#8211; \u6302\u8f7d OneDrive\u3001Google Drive \u7b49\u7f51\u76d8(Linux)<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[4,6,44,8,43],"_links":{"self":[{"href":"https:\/\/blog.kimi.ee\/index.php?rest_route=\/wp\/v2\/posts\/95"}],"collection":[{"href":"https:\/\/blog.kimi.ee\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kimi.ee\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kimi.ee\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kimi.ee\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=95"}],"version-history":[{"count":0,"href":"https:\/\/blog.kimi.ee\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.kimi.ee\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kimi.ee\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kimi.ee\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}