photoprism/docker/entrypoint.sh
Michael Mayer b5c71742d8 Docker: Upgrade Go to 1.15.3
Signed-off-by: Michael Mayer <michael@lastzero.net>
2020-10-20 12:47:04 +02:00

21 lines
452 B
Bash
Executable file

#!/usr/bin/env bash
if [[ ${UMASK} ]]; then
umask "${UMASK}"
fi
if [[ ${UID} ]] && [[ ${GID} ]] && [[ ${UID} != "0" ]] && [[ $(id -u) = "0" ]]; then
groupadd -f -g "${GID}" "${GID}"
usermod -o -u "${UID}" -g "${GID}" photoprism
gosu "${UID}:${GID}" "$@" &
elif [[ ${UID} ]] && [[ ${UID} != "0" ]] && [[ $(id -u) = "0" ]]; then
usermod -o -u "${UID}" photoprism
gosu "${UID}" "$@" &
else
"$@" &
fi
PID=$!
trap "kill $PID" INT TERM
wait