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