added root folder
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
# If the first run completed successfully, we are done
|
||||||
|
if [ -e /.firstPlexdriveRunComplete ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
home="$(echo ~plex)"
|
||||||
|
configSubDir="${home}/${PLEXDRIVE_CONFIG_DIR}"
|
||||||
|
|
||||||
|
# Update ownership of dirs we need to write
|
||||||
|
if [ "${CHANGE_PLEXDRIVE_CONFIG_DIR_OWNERSHIP,,}" = "true" ]; then
|
||||||
|
if [ -d "${configSubDir}" ]; then
|
||||||
|
chown -Rc plex:plex ${configSubDir}
|
||||||
|
else
|
||||||
|
echo "Plexdrive config folder does not exist"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p ${PLEXDRIVE_MOUNT_POINT} 2>/dev/null
|
||||||
|
chown -Rc plex:plex ${PLEXDRIVE_MOUNT_POINT}
|
||||||
|
|
||||||
|
touch /.firstPlexdriveRunComplete
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
echo "Stopping Plexdrive"
|
||||||
|
home="$(echo ~plex)"
|
||||||
|
|
||||||
|
exec s6-setuidgid plex \
|
||||||
|
/bin/sh -c \
|
||||||
|
"/bin/fusermount -u -z ${PLEXDRIVE_MOUNT_POINT}"
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
echo "Starting Plexdrive"
|
||||||
|
|
||||||
|
exec s6-setuidgid plex \
|
||||||
|
/bin/sh -c \
|
||||||
|
"/usr/local/bin/plexdrive mount -v 2 -c ${HOME}/${PLEXDRIVE_CONFIG_DIR} --cache-file=${HOME}/${PLEXDRIVE_CONFIG_DIR}/cache.bolt -o allow_other ${PLEXDRIVE_MOUNT_POINT}"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Plexdrive updater
|
||||||
|
cd /tmp
|
||||||
|
wget $(curl -s https://api.github.com/repos/dweidenfeld/plexdrive/releases/latest | grep 'browser_' | cut -d\" -f4 | grep plexdrive-linux-amd64) -q -O plexdrive
|
||||||
|
chmod -c +x /tmp/plexdrive
|
||||||
|
version=$(/tmp/plexdrive --version)
|
||||||
|
echo "Installing Plexdrive v. ${version}"
|
||||||
|
#install plexdrive
|
||||||
|
mv -v /tmp/plexdrive /usr/local/bin/
|
||||||
|
chown -c root:root /usr/local/bin/plexdrive
|
||||||
Reference in New Issue
Block a user