yeni's Bin

Rclone 自启动模板

Rclone 常常需要开机自动挂载,一般采用 systemd 服务模式启动,采用的模板如下

[Unit]
Description=Rclone for [your-project]
After=network.target

[Service]
ExecStart=/usr/bin/rclone mount [your-remote]:[remote-folder(can be empty for root folder)] [your-local-folder] \
--allow-non-empty \
--allow-other \
--attr-timeout 5m \
--transfers 2 \
--buffer-size 32M \
--low-level-retries 200 \
--vfs-read-chunk-size 32M \
--vfs-read-chunk-size-limit 128M \
--vfs-cache-mode full \
--vfs-cache-max-age 24h \
--vfs-cache-max-size 10G \
--tpslimit 4 \
--checkers 4
Restart=on-failure
RestartSec=15

ExecStop=/usr/bin/fusermount -u [your-local-folder]

[Install]
WantedBy=default.target

ref