mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Rename plex/rootfs/scripts/90-create_links.sh to plex/rootfs/etc/cont-init.d/90-create_links.sh
This commit is contained in:
24
plex/rootfs/etc/cont-init.d/90-create_links.sh
Executable file
24
plex/rootfs/etc/cont-init.d/90-create_links.sh
Executable 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
|
||||
Reference in New Issue
Block a user