28 lines
713 B
SYSTEMD
28 lines
713 B
SYSTEMD
|
[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
|