Added local unencrypted repository
This commit is contained in:
@@ -1 +1,2 @@
|
||||
2020-05-02 - Added local unencrypted repository
|
||||
2020-03-26 - Updated to latest plex server version
|
||||
|
||||
@@ -1,19 +1,31 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
mkdir /encrypted
|
||||
mkdir /mnt/plexdrv_encrypted
|
||||
rm -Rf ~/.cache
|
||||
rclone mount --daemon --allow-other --vfs-cache-mode minimal --no-modtime --write-back-cache gcache:/ /encrypted --log-file /tmp/rclone.log --log-level DEBUG
|
||||
while [ ! -f "/encrypted/gocryptfs.conf" ]
|
||||
rclone mount --daemon --allow-other --vfs-cache-mode minimal --no-modtime --write-back-cache gcache:/ /mnt/plexdrv_encrypted --log-file /tmp/rclone.log --log-level DEBUG
|
||||
|
||||
while [ ! -f "/mnt/plexdrv_encrypted/gocryptfs.conf" ]
|
||||
do
|
||||
echo "Waiting for gocryptfs.conf to appear..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
mkdir -pv /Video
|
||||
chmod 777 /Video
|
||||
mkdir -pv /mnt/plexdrv_video /Video
|
||||
chmod 777 /mnt/plexdrv_video /Video
|
||||
|
||||
s6-setuidgid plex gocryptfs -passfile /etc/plexdrv/enc-pwd /encrypted/ /Video
|
||||
s6-setuidgid plex gocryptfs -passfile /etc/plexdrv/enc-pwd /mnt/plexdrv_encrypted/ /mnt/plexdrv_video
|
||||
|
||||
if [ -f /mnt/local_mirror/Video/gocryptfs.conf ]
|
||||
then
|
||||
echo "local plexdrive mirror found"
|
||||
mkdir -pv /mnt/mirror_decrypted
|
||||
chmod 777 /mnt/mirror_decrypted /mnt/local_mirror
|
||||
s6-setuidgid plex gocryptfs -passfile /etc/plexdrv/enc-pwd /mnt/local_mirror/Video /mnt/mirror_decrypted
|
||||
s6-setuidgid plex unionfs-fuse /mnt/video:/mnt/mirror_decrypted=RO:/mnt/plexdrv_video=RO /Video
|
||||
else
|
||||
s6-setuidgid plex unionfs-fuse /mnt/video:/mnt/plexdrv_video=RO /Video
|
||||
fi
|
||||
|
||||
# Keep running so this script is recognised as running service
|
||||
until false
|
||||
do
|
||||
true
|
||||
|
||||
@@ -5,3 +5,4 @@ cd /config
|
||||
tar -cvzf /pms.tar.gz Library
|
||||
|
||||
rclone move /pms.tar.gz $BACKUP --verbose --transfers 4 --checkers 20 --stats 10s
|
||||
|
||||
|
||||
Reference in New Issue
Block a user