Skip to content

Instantly share code, notes, and snippets.

@moriglia
Created November 4, 2021 12:28
Show Gist options
  • Save moriglia/f99a1dca3e75507ffb65a8cc8e331e49 to your computer and use it in GitHub Desktop.
Save moriglia/f99a1dca3e75507ffb65a8cc8e331e49 to your computer and use it in GitHub Desktop.
Use rclone to mount a remote cloud storage. Make systemd automatically manage the mounting process.
[Unit]
Description="Mount Drive - <Remote Name>"
Wants=network-online.target
After=network-online.target
[Service]
ExecStart=/usr/bin/rclone --vfs-cache-mode writes mount remote_name: /path/to/mountpoint
Restart=on-failure
RestartSec=10
SyslogIdentifier=%i
[Install]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment