uci-docker-build/core/rootfs/opt/lib/user-set-host-id

9 lines
203 B
Bash
Executable File

#!/bin/bash
if [[ $USER ]]; then
UHID=${UHID:-1000}
if [[ ! $(id -un $UHID) ]]; then
groupmod -g $UHID $USER
usermod -u $UHID -g $UHID $USER
chown -R -h $UHID:$UHID /opt $1 $VOLUME_DIRS
fi
fi