Skip to content

Instantly share code, notes, and snippets.

@jonchampagne
Created December 11, 2019 20:21
Show Gist options
  • Save jonchampagne/38663cb08ff13a56998910da6fe2655c to your computer and use it in GitHub Desktop.
Save jonchampagne/38663cb08ff13a56998910da6fe2655c to your computer and use it in GitHub Desktop.
rclone-mount@.service
[Unit]
Description=Mount %i
#AssertPathIsDirectory=%h/%i
#After=network.service # Not sure if this is needed
[Service]
Type=simple
ExecStartPre=/usr/bin/mkdir -p %h/%i
ExecStart=/usr/bin/rclone mount \
--config=%h/.config/rclone/rclone.conf \
--cache-tmp-upload-path=%V/rclone/upload \
--cache-chunk-path=%V/rclone/chunks \
--cache-workers=8 \
--cache-writes \
--cache-dir=%V/rclone/vfs \
--cache-db-path=%V/rclone/db \
--no-modtime \
--stats=0 \
--checkers=16 \
--dir-cache-time=60m \
--cache-info-age=60m \
--no-check-certificate \
%i:/ %h/%i
ExecStop=/usr/bin/fusermount -u %h/%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