This repository has been archived on 2026-02-02. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
dotfiles/.ansible/roles/rclone_mount/files/rclone.service

27 lines
713 B
Desktop File

[Unit]
Description=Google Drive (rclone)
AssertPathIsDirectory=/mnt/GoogleDriveCrypt
Requires=systemd-networkd.service
Wants=network-online.target
After=network-online.target
Before=mnt-media.mount
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount \
--config=/srv/etc/rclone/rclone.conf \
--allow-other \
--no-modtime \
--read-only \
--tpslimit=10 \
--tpslimit-burst=1 \
GoogleDriveCrypt:/ /mnt/GoogleDriveCrypt
ExecStartPost=/bin/bash -c 'while [ ! -d /mnt/GoogleDriveCrypt/_Other ]; do /usr/bin/sleep 5; done'
ExecStop=/bin/fusermount -u /mnt/GoogleDriveCrypt
Restart=always
RestartSec=10
User=media
Group=media
[Install]
WantedBy=multi-user.target