Skip to content

Instantly share code, notes, and snippets.

@shizeeg
Created February 14, 2020 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shizeeg/080d62f5846d79c811236b7e75b92117 to your computer and use it in GitHub Desktop.
Save shizeeg/080d62f5846d79c811236b7e75b92117 to your computer and use it in GitHub Desktop.
Rclone.org mounting service for systemd
[Unit]
Description=Cloud Drive (rclone)
[Service]
Type=simple
ExecStartPre=/usr/bin/mkdir -p %h/Cloud/%I
ExecStart=/usr/bin/rclone mount \
--cache-tmp-upload-path=/tmp/rclone/upload \
--cache-chunk-path=/tmp/rclone/chunks \
--cache-workers=8 \
--cache-writes \
--cache-dir=/tmp/rclone/vfs \
--cache-db-path=/tmp/rclone/db \
--no-modtime \
--drive-use-trash \
--stats=0 \
--checkers=16 \
--bwlimit=40M \
--dir-cache-time=60m \
--cache-info-age=60m %I:/ %h/Cloud/%I
ExecStop=/bin/fusermount -u %h/Cloud/%I
ExecStopPost=/usr/bin/rmdir %h/Cloud/%I
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment