Fix Docker permissions if pre-existing PUID/PGID

This commit is contained in:
JonnyWong16 2020-06-21 09:58:29 -07:00
parent c7a3e1e3bf
commit 45f0001da5
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -3,9 +3,9 @@
if [[ "$TAUTULLI_DOCKER" = "True" ]]; then
PUID=${PUID:-911}
PGID=${PGID:-911}
getent group tautulli 2>&1 > /dev/null || groupadd -g "$PGID" tautulli
getent passwd tautulli 2>&1 > /dev/null || useradd -r -u "$PUID" -g tautulli tautulli
chown -f -R tautulli:tautulli /config
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
python Tautulli.py --datadir /config
else
python Tautulli.py &> /dev/null &