Moved from plexdrive to rclone-caching

This commit is contained in:
2019-11-06 12:56:52 +01:00
parent 8b0d92f9d1
commit 3bf0b357e3
5 changed files with 14 additions and 33 deletions

View File

@@ -1,17 +1,15 @@
version: '2'
services:
plex:
# build: ./
image: kilhaasi/pms
container_name: pms
build: ./
image: kilhaasi/pms-dev
container_name: pms-dev
volumes:
- /Video:/Video:shared
- /Photo:/Photo
- /Transcode:/Transcode
- /Docker/Plex-Video/plex_cfg:/config
- /Docker/Plex-Video/.rclone.conf:/root/.rclone.conf
- /Docker/Plex-Video/plexdrv-cfg:/root/.plexdrive
- /Docker/Plex-Video/enc-pwd:/root/enc-pwd
- /Docker/Plex-Video/cache:/cache
- /Docker/Plex-Video/plexdrv:/etc/plexdrv
environment:
- TZ=DE
- BACKUP=gdrive:/Backup/Plex-Dev

View File

@@ -1,7 +1,8 @@
#!/usr/bin/with-contenv bash
# Check, if a configuration directory exists
cp /etc/plexdrv/.rclone.conf /root/.rclone.conf
mkdir -pv ~/.config/rclone
cp /etc/plexdrv/rclone.conf ~/.config/rclone/rclone.conf
if [[ -d /config/Library ]]
then
echo "Configuration found, skipping restore of backup"

View File

@@ -1,5 +1,7 @@
#!/usr/bin/with-contenv bash
while [ ! -f "/encrypted/Video/gocryptfs.conf" ]
mkdir /encrypted
rclone mount --daemon --allow-other gcache:/ /encrypted
while [ ! -f "/encrypted/gocryptfs.conf" ]
do
echo "Waiting for gocryptfs.conf to appear..."
sleep 1
@@ -8,7 +10,7 @@ done
mkdir -pv /Video
chmod 777 /Video
s6-setuidgid plex gocryptfs -passfile /etc/plexdrv/enc-pwd /encrypted/Video/ /Video
s6-setuidgid plex gocryptfs -passfile /etc/plexdrv/enc-pwd /encrypted/ /Video
until false

View File

@@ -1,20 +0,0 @@
#!/usr/bin/with-contenv bash
while [ ! -f "/etc/plexdrv/config.json" ] || [ ! -f "/etc/plexdrv/token.json" ]
do
echo "Waiting for plexdrive configuration files ..."
sleep 30
done
umask 022
IFS=" " read -r -a RUN_ARRAY <<< "$RUN_OPTS"
touch /cache/cache.bolt && chmod 666 /cache/cache.bolt
mount_command="plexdrive mount -c /etc/plexdrv/ --cache-file=/cache/cache.bolt -v 3 --umask=0777 --chunk-size=10M --uid=$PLEX_UID --gid=$PLEX_GID -o allow_other /encrypted ${RUN_ARRAY[@]}"
echo "Executing => $mount_command"
mkdir /encrypted /decrypted
chmod 777 /encrypted /decrypted
exec \
s6-setuidgid plex $mount_command

Binary file not shown.