Rename plex/rootfs/scripts/90-create_links.sh to plex/rootfs/etc/cont-init.d/90-create_links.sh

This commit is contained in:
Alexandre
2023-09-14 09:55:38 +02:00
committed by GitHub
parent 22c714bebf
commit cf9ef047da

View File

@@ -0,0 +1,24 @@
#!/bin/bash
##################
# SYMLINK CONFIG #
##################
if [ ! -d /share/plex ]; then
echo "Creating /share/plex"
mkdir -p /share/plex
chown -R "$PUID:$PGID" /share/plex
else
chown -R "$PUID:$PGID" /share/plex
fi
if [ ! -d /share/plex/Library ]; then
echo "moving Library folder"
mv /config/Library /share/plex
ln -s /share/plex/Library /config
echo "links done"
else
rm -r /config/Library
ln -s /share/plex/Library /config
echo "Using existing config"
fi