Last active
March 16, 2021 20:30
-
-
Save hthighway/ba4e19f314b347670acb3e15597300a4 to your computer and use it in GitHub Desktop.
SYSTEMD files for plexdrive. Ceates a plexdrive mount and then a UnionFS of local and remote content (SEE updated version here: https://github.com/hthighway/scripts/tree/master/plexdrive )
This file contains 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 | |
# | |
# To monitor the PlexDrive activity use: sudo journalctl -f -u plexdrive | |
# |
This file contains 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=plexdrive.service | |
Requires=plexdrive.service | |
PartOf=plexdrive.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 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/remote_media=RO /mnt/media |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
plexdrive.service is missing the mount
ExecStart=/opt/plexdrive/plexdrive mount -c /home/user/.plexdrive -v 2 -o allow_other --uid=1000 --gid=1000 /mnt/plexdrive