docker-plex-wireguard/init/90_uid_gid_fix.sh

20 lines
631 B
Bash
Raw Normal View History

2015-05-10 10:50:00 +02:00
#!/bin/bash
2015-06-30 11:48:46 -05:00
if [ "$(id -u abc)" != "$PUID" ]; then usermod -u "$PUID" abc ; fi
if [ "$(id -g abc)" != "$PGID" ]; then groupmod -o -g "$PGID" abc ; fi
2015-07-27 14:08:05 -05:00
find /config -not \( -user abc -a -group abc \) -exec chown abc:abc {} +
# May not be a good idea to mess with permissions set by Plex
#find /config -type f -a -perm -0660 -exec chmod ug+rw {} +
#find /config -type d -a -perm -0770 -exec chmod ug+rwx {} +
2015-05-10 10:50:00 +02:00
echo "
-----------------------------------
Plex GID/UID
2015-05-10 10:50:00 +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