Google Drive vs. ACD for Plex

I sort of followed this post to tweak a few things:

The modtimes were broken for a while, but the latest pull from githib fixed those.

The only thing I am doing is running:

`watch -n 60 plex-node-cleanup`

on this script:

#!/bin/sh

find /media/media/Temp/gdrivecache/download -maxdepth 1 -mmin +1 -exec rm -f {} \;

The cache fills up and apparently it is not being cleaned up, so this is a hack to get that working.

I had the cache of node-gdrive-fuse pointing to /dev/shm (memory) as that post suggested, but had problems with that as I only have 8GB of memory on this machine.

Then I use a cronjob to make sure it stays up.

`* * * * * /usr/local/bin/plex-node-mount-check >/dev/null 2>&1`

#!/bin/sh

if ps -ef | grep -v grep | grep "node fs.es6.js" ; then
exit 0
else
/usr/local/bin/plex-node-mount
exit 0
fi

#!/bin/sh

#Unmount any directories already mounted
/bin/fusermount -uz /media/media/.gfuse

#Kill process if any
ps -ef | grep -v grep | grep "node fs.es6.js" | awk '{print $2}' | xargs kill

#Mount the node google drive again
cd /root/Src/node-gdrive-fuse/src&&node fs.es6.js &

exit

1 Like