Created
April 25, 2023 13:08
-
-
Save MatteoR23/03ce7bfae5d3944528de996fde262344 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# User service for Rclone mounting | |
# | |
# Place in ~/.config/systemd/user/ | |
# File must include the '@' (ex [email protected]) | |
# As your normal user, run | |
# systemctl --user daemon-reload | |
# You can now start/enable each remote by using rclone@<remote> | |
# systemctl --user enable --now rclone@dropbox | |
[Unit] | |
Description=rclone: Remote FUSE filesystem for cloud storage config %i | |
Documentation=man:rclone(1) | |
After=network-online.target | |
Wants=network-online.target | |
[Service] | |
Type=notify | |
ExecStartPre=-/usr/bin/mkdir -p %h/mnt/%i | |
ExecStart= \ | |
/usr/bin/rclone mount \ | |
--config=%h/.config/rclone/rclone.conf \ | |
--vfs-cache-mode writes \ | |
--vfs-cache-max-size 100M \ | |
--log-level INFO \ | |
--log-file /tmp/rclone-%i.log \ | |
--umask 022 \ | |
--allow-other \ | |
%i: %h/mnt/%i | |
ExecStop=/bin/fusermount -u %h/mnt/%i | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment