Last active
April 20, 2025 15:49
-
-
Save Tedpac/4b198d79f2d17cc19dff37b6d7861138 to your computer and use it in GitHub Desktop.
Systemd Service Template for Mounting Cloud Storage with Rclone
This file contains hidden or 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
[Unit] | |
Description= | |
Documentation=man:rclone(1) | |
Wants=network-online.target | |
After=network-online.target | |
[Service] | |
Type=notify | |
EnvironmentFile=/etc/default/rclone | |
Environment="MOUNT_POINT=%h/.mnt/<cloud_storage_provider>" | |
Environment="RCLONE_REMOTE_PATH=" | |
Environment="RCLONE_FLAGS=" | |
ExecStartPre=/usr/bin/mkdir --parents "${MOUNT_POINT}" | |
ExecStart=/usr/bin/rclone mount "${RCLONE_REMOTE_PATH}" "${MOUNT_POINT}" "${RCLONE_FLAGS}" | |
ExecStop=/usr/bin/fusermount -u "${MOUNT_POINT}" | |
RestartSec=10 | |
Restart=on-failure | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment