note/tech/使用rclone同步网盘.md
2025-11-19 10:16:05 +08:00

23 lines
677 B
Markdown
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用rclone同步网盘
```
[Unit]
Description=rclone
[Service]
Environment="http_proxy=http://127.0.0.1:10801"
Environment="https_proxy=http://127.0.0.1:10801"
Environment='REMOTE_PATH=GoogleDrive:/'
#GoogleDrive/ 表示 name云盘文件夹路径斜杠 / 表示将整个云盘挂载到本地,注意冒号
Environment='LOCAL_PATH=/home/GoogleDrive/'
#挂载到服务器本地的路径
Type=simple
User=root
ExecStart=rclone mount ${REMOTE_PATH} ${LOCAL_PATH} --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
ExecStop=fusermount -qzu ${LOCAL_PATH}
Restart=on-failure
[Install]
WantedBy=multi-user.target
```