zoukankan      html  css  js  c++  java
  • gdrive无限网盘挂载systemd文件

    我的博客新地址:www.liuquanhao.com

    ---------------------------------------------------------------------

    首先应该配置好rclone,然后挂载测试:

    $ rclone mount config_name:/path/ local_path
    

     

    测试没问题,就可以添加systemctl配置文件了:

    这里也配置了代理,不然无法访问google drive,在rc-local.service里,配置了开机代理,

    这样在开机后,先开代理,然后执行这个systemd文件,就可以利用代理连接上google drive了。

    /lib/systemd/system/rclone_ulimit.service

    [Unit]
    Description=rclone mount ulimit gdrive
    Requires=rc-local.service
    After=rc-local.service
    
    [Service]
    Type=simple
    User=liuxu
    Environment="HTTP_PROXY=http://127.0.0.1:8118/"
    Environment="HTTPS_PROXY=http://127.0.0.1:8118/"
    ExecStartPre=/bin/mkdir -p /home/liuxu/ulimit_gdrive
    ExecStart=/usr/bin/rclone mount ulimit_gdrive: /home/liuxu/ulimit_gdrive --config /home/liuxu/.config/rclone/rclone.conf --checkers 16 --dir-cache-time 30m --quiet
    ExecStop=/bin/fusermount -u ulimit_gdrive
    Restart=on-abort
    
    [Install]
    WantedBy=multi-user.target
    

      

  • 相关阅读:
    python
    js 对嵌套页面的父页面进行跳转
    HTML 添加空格
    python
    python
    python
    面向对象编程基础(进阶4)
    Python模块(进阶3)
    Python函数式编程(进阶2)
    python进阶介绍(进阶1)
  • 原文地址:https://www.cnblogs.com/liuxuzzz/p/8994668.html
Copyright © 2011-2022 走看看