-
-
Save ysl2/6e9075d228d09a3ba9ab0beb687cf4d4 to your computer and use it in GitHub Desktop.
Rclone systemd user service
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 rclone@.service) | |
# As your normal user, run | |
# systemctl --user daemon-reload | |
# You can now start/enable each remote by using rclone@<remote> | |
# systemctl --user enable rclone@dropbox | |
# systemctl --user start 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 | |
AssertPathIsDirectory=%h/mnt/%i | |
[Service] | |
Type=notify | |
ExecStart= \ | |
/usr/bin/rclone mount \ | |
--config=%h/.config/rclone/rclone.conf \ | |
--fast-list \ | |
--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