Only change Docker permissions if PUID/PGID exists

This commit is contained in:
JonnyWong16 2020-06-21 10:38:26 -07:00
commit 40fd82febd
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -1,8 +1,6 @@
#!/usr/bin/env bash
if [[ "$TAUTULLI_DOCKER" = "True" ]]; then
PUID=${PUID:-911}
PGID=${PGID:-911}
if [[ "$TAUTULLI_DOCKER" = "True" && -v PUID && -v PGID ]]; then
getent group "$PGID" 2>&1 > /dev/null || groupadd -g "$PGID" tautulli
getent passwd "$PUID" 2>&1 > /dev/null || useradd -r -u "$PUID" -g "$PGID" tautulli
chown -f -R "$PUID":"$PGID" /config