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
    

      

  • 相关阅读:
    如何设置路由器实现静态IP配置
    linux内核源码结构
    linux源码“.config”文件分析
    用python来调试网络程序
    dbm速算
    用python虚拟串口
    sed学习笔记
    贴一段shell代码
    ethtool使用记录
    mint锁屏设置
  • 原文地址:https://www.cnblogs.com/liuxuzzz/p/8994668.html
Copyright © 2011-2022 走看看