try always setting id and gid rather than test

This commit is contained in:
sparklyballs 2016-11-12 21:30:55 +00:00
parent 38327507e5
commit 424bf23aa7

View file

@ -1,11 +1,10 @@
#!/usr/bin/with-contenv bash
[[ -z $PGID ]] && PGID="911"
[[ -z $PUID ]] && PUID="911"
PUID=${PUID:-911}
PGID=${PGID:-911}
if [ ! "$(id -u abc)" -eq "$PUID" ]; then usermod -o -u "$PUID" abc ; fi
if [ ! "$(id -g abc)" -eq "$PGID" ]; then groupmod -o -g "$PGID" abc ; fi
groupmod -o -g "$PGID" abc
usermod -o -u "$PUID" abc
echo "
-------------------------------------