2015-05-10 10:50:00 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2015-07-28 09:16:17 -05:00
|
|
|
if [ -n "$PUID" -a "$(id -u abc)" != "$PUID" ]; then usermod -u "$PUID" abc ; fi
|
|
|
|
|
if [ -n "$PGID" -a "$(id -g abc)" != "$PGID" ]; then groupmod -o -g "$PGID" abc ; fi
|
|
|
|
|
|
|
|
|
|
# There will be a lot of files in the config and searching through all of them will take a long time.
|
|
|
|
|
# Only Plex should modify these, so do a quick test to see if we need to search deeper.
|
|
|
|
|
if [ -n "$( find /config -maxdepth 2 -not \( -user abc -a -group abc \) )" ]; then
|
|
|
|
|
find /config -not \( -user abc -a -group abc \) -exec chown abc:abc {} +
|
|
|
|
|
fi
|
2015-05-10 10:50:00 +02:00
|
|
|
|
|
|
|
|
echo "
|
|
|
|
|
-----------------------------------
|
2015-05-10 12:05:42 +02:00
|
|
|
Plex GID/UID
|
2015-05-10 10:50:00 +02:00
|
|
|
-----------------------------------
|
2015-05-10 12:05:42 +02:00
|
|
|
Plex uid: $(id -u abc)
|
|
|
|
|
Plex gid: $(id -g abc)
|
2015-05-10 10:50:00 +02:00
|
|
|
-----------------------------------
|
|
|
|
|
Plex will now continue to boot.
|
|
|
|
|
"
|
2015-06-30 11:48:46 -05:00
|
|
|
sleep 2
|