From: David Blacka Date: Tue, 28 Feb 2023 22:32:28 +0000 (-0500) Subject: more setup fixes X-Git-Url: https://blacka.com/cgi-bin/gitweb.cgi?p=docker_gitea.git;a=commitdiff_plain;h=b97136ee5c2cb3a964cc78f743190bad4c53060d more setup fixes --- diff --git a/setup.sh b/setup.sh index 57911a6..a7fcec1 100755 --- a/setup.sh +++ b/setup.sh @@ -2,11 +2,12 @@ GITEA_HOME=/var/lib/gitea HOST_GIT_USER=git # this will be the user in the ssh git urls, e.g. git@blacka.com/org/repo.git +UID=895 # create the 'gitea' user to run and own this thing -if ! id -u 985 >/dev/null 2>&1; then - groupadd -g 895 "$HOST_GIT_USER" - useradd -u 895 -g "$HOST_GIT_USER" -G docker -d "$GITEA_HOME" -m gitea +if ! id -u "$UID" >/dev/null 2>&1; then + groupadd -g "$UID" "$HOST_GIT_USER" + useradd -u "$UID" -g "$HOST_GIT_USER" -G docker -d "$GITEA_HOME" -m gitea fi install -d "$GITEA_HOME/data"