gdrive unlimited network disk mount systemd file

First you should configure rclone, and then mount the test:

$ rclone mount config_name:/path/ local_path

 

There is no problem with the test, you can add the systemctl configuration file:

The proxy is also configured here, otherwise google drive cannot be accessed. In rc-local.service, the boot proxy is configured,

In this way, after booting, first open the proxy, and then execute the systemd file, you can use the proxy to connect to 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

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325374254&siteId=291194637