A group is now created if it doesn't exist already. Signed-off-by: Michael Mayer <michael@lastzero.net>
This commit is contained in:
parent
2b0680a31e
commit
2e31120cda
1 changed files with 3 additions and 3 deletions
|
@ -5,11 +5,11 @@ if [[ ${UMASK} ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${UID} ]] && [[ ${GID} ]] && [[ ${UID} != "0" ]] && [[ $(id -u) = "0" ]]; then
|
if [[ ${UID} ]] && [[ ${GID} ]] && [[ ${UID} != "0" ]] && [[ $(id -u) = "0" ]]; then
|
||||||
usermod -u ${UID} photoprism
|
groupadd -f -g ${GID} ${GID}
|
||||||
usermod -g ${GID} photoprism
|
usermod -o -u ${UID} -g ${GID} photoprism
|
||||||
gosu ${UID}:${GID} "$@" &
|
gosu ${UID}:${GID} "$@" &
|
||||||
elif [[ ${UID} ]] && [[ ${UID} != "0" ]] && [[ $(id -u) = "0" ]]; then
|
elif [[ ${UID} ]] && [[ ${UID} != "0" ]] && [[ $(id -u) = "0" ]]; then
|
||||||
usermod -u ${UID} photoprism
|
usermod -o -u ${UID} photoprism
|
||||||
gosu ${UID} "$@" &
|
gosu ${UID} "$@" &
|
||||||
else
|
else
|
||||||
"$@" &
|
"$@" &
|
||||||
|
|
Loading…
Reference in a new issue