Skip to content

Instantly share code, notes, and snippets.

@jaketame
Last active May 2, 2021 09:36
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaketame/a4322f249fbfb10d5e4f77a79824769d to your computer and use it in GitHub Desktop.
Save jaketame/a4322f249fbfb10d5e4f77a79824769d to your computer and use it in GitHub Desktop.
PlexDrive / rclone crypt / overlayfs service files
# Install this under /lib/systemd/system
# systemctl enable data-media.mount
# systemctl start data-media.mount
[Unit]
Description=Google Drive (overlay)
After=rclonecrypt.service
[Mount]
What=overlay
Where=/data/media
Type=overlay
Options=lowerdir=/data/.gcd-crypt/,upperdir=/data/.local/,workdir=/data/.work/
[Install]
WantedBy=default.target
# Install this under /lib/systemd/system
# systemctl enable plexdrive.service
# systemctl start plexdrive.service
[Unit]
Description=Plexdrive
AssertPathIsDirectory=/data/.gcd/
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/plexdrive -o allow_other,max_readahead=10000 --uid=1001 --gid=1001 -v 3 /data/.gcd/
ExecStop=/bin/fusermount -u /data/.gcd/
Restart=on-abort
[Install]
WantedBy=default.target
# Install this under /lib/systemd/system
# systemctl enable rclonecrypt.service
# systemctl start rclonecrypt.service
[Unit]
Description=Google Drive (rclone)
AssertPathIsDirectory=/data/.gcd
After=plexdrive.service
[Service]
Type=simple
ExecStart=/usr/sbin/rclone mount --config /home/usenet/.rclone.conf --gid 1001 --uid 1001 --read-only --allow-non-empty --allow-other --max-read-ahead 10M --buffer-size 500M gcd-crypt: /data/.gcd-crypt/
ExecStop=/bin/fusermount -u /data/.gcd-crypt/
Restart=on-abort
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment