added root folder

This commit is contained in:
2018-10-30 23:18:39 +01:00
parent 7447b8a933
commit 83f1ddabb2
4 changed files with 48 additions and 0 deletions
@@ -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
+8
View File
@@ -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}"
+7
View File
@@ -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}"