Skip to content

Instantly share code, notes, and snippets.

@amenpunk
Last active September 14, 2021 16:46
Show Gist options
  • Save amenpunk/bddc60b9a075e4a400f8d68080516e47 to your computer and use it in GitHub Desktop.
Save amenpunk/bddc60b9a075e4a400f8d68080516e47 to your computer and use it in GitHub Desktop.
Simple rclone gdrive systemd service
# /etc/systemd/system/rclone.service
[Unit]
Description=Google Drive (rclone ming)
AssertPathIsDirectory=/home/ming/Drive
After=plexdrive.service
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount \
--allow-other \
--allow-non-empty \
--config=/home/ming/.config/rclone/rclone.conf GoogleDrive:/ /home/ming/Drive/
ExecStop=/bin/fusermount -u /home/ming/Drive
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