Skip to content

Instantly share code, notes, and snippets.

@vasi
Created November 25, 2024 19:20
Show Gist options
  • Save vasi/3c41e0a127f0f50aaa081e26aa2e8a5a to your computer and use it in GitHub Desktop.
Save vasi/3c41e0a127f0f50aaa081e26aa2e8a5a to your computer and use it in GitHub Desktop.
GDrive mount on login
[Unit]
Description=Mount Google Drive
After=network-online.target
[Service]
Type=notify
ExecStartPre=/usr/bin/test -x /usr/bin/rclone
ExecStartPre=/usr/bin/test -d "%h/gdrive"
ExecStart=/usr/bin/rclone mount gdrive: "%h/gdrive"
ExecStop=/bin/fusermount -u "%h/gdrive"
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment