Last active
October 12, 2018 21:49
-
-
Save hthighway/56a1e805f6c8618200b24d08bf91979b to your computer and use it in GitHub Desktop.
PlexDrive + Rclone Crypt + UnionFS Mount
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=RClone Mount (crypt) | |
AssertPathIsDirectory=/mnt/decrypt | |
After=plexdrive.service | |
Requires=plexdrive.service | |
PartOf=plexdrive.service | |
[Service] | |
Type=simple | |
User=username | |
Group=username | |
ExecStart=/usr/bin/rclone mount --read-only --allow-non-empty --allow-other --buffer-size 500M -v --log-file=/home/hawk/scripts/logs/rclone_crypt.log GDCRYPT: /mnt/decrypt/ | |
ExecStop=/bin/fusermount -uz /mnt/decrypt | |
Restart=on-abort | |
RestartSec=5 | |
StartLimitInterval=60s | |
StartLimitBurst=3 | |
[Install] | |
WantedBy=default.target | |
# | |
# To monitor the PlexDrive activity use: sudo journalctl -f -u plexdrive | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Plexdrive | |
AssertPathIsDirectory=/mnt/plexdrive | |
After=network-online.target | |
[Service] | |
Type=simple | |
# | |
# uid & gid values are for the user that you want to run plexdrive, $id will give you the values for the logged in user | |
# | |
ExecStart=/opt/plexdrive/plexdrive -c /home/user/.plexdrive -v 2 -o allow_other --uid=1000 --gid=1000 /mnt/plexdrive | |
ExecStop=/bin/fusermount -uz /mnt/plexdrive | |
Restart=on-abort | |
RestartSec=30 | |
StartLimitInterval=200 | |
StartLimitBurst=5 | |
[Install] | |
WantedBy=default.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=UnionFS Mount (plexdrive) | |
AssertPathIsDirectory=/mnt/media | |
After=plexcrypt.service | |
Requires=plexcrypt.service | |
PartOf=plexcrypt.service | |
[Service] | |
Type=forking | |
User=user | |
Group=user | |
ExecStart=/bin/sh /home/user/scripts/unionfs.sh | |
ExecStop=/bin/fusermount -uz /mnt/media | |
Restart=on-abort | |
RestartSec=5 | |
StartLimitInterval=60s | |
StartLimitBurst=3 | |
[Install] | |
WantedBy=default.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[GDCRYPT] | |
type = crypt | |
remote = /plexmedia/plexdrive/plexmedia_crypt | |
filename_encryption = standard | |
password =XXXXXXXXXXXXXXXXXXXXXX | |
password2 = XXXXXXXXXXXXXXXXXXXX | |
# /plexmedia/plexdrive is the mount location for PLEXDRIVE | |
# and /plexmedia_crypt is the folder that contain the encrypted media on GD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
unionfs-fuse -o cow,allow_other,large_read,statfs_omit_ro,atomic_o_trunc,auto_cache,big_writes,default_permissions,splice_move,splice_read,nonempty -o uid=1000 -o gid=1000 /mnt/local=RW:/mnt/plexdrive/decrypt=RO /mnt/media | |
# udpated for the rclone crypt mount |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment