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,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