From 3f414ca0891217db9c42b1799fd0459bd1c6ed1a Mon Sep 17 00:00:00 2001 From: Sage Date: Mon, 18 Sep 2023 21:17:43 +0200 Subject: [PATCH] GH-1938 Fix Reposilite not starting using Docker on the latest nightly (Fix #1934) --- entrypoint.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index a278fb51b..1dfd947e6 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -17,17 +17,15 @@ if [ "$UID" -ne "0" ]; then $REPOSILITE_ARGS else GROUP_ID="${PGID:-999}" - grep "^reposilite" /etc/group > /dev/null - if [ $? -ne 0 ] + if ! grep -q "^reposilite" /etc/group; then - addgroup --gid "$GROUP_ID" reposilite + addgroup --gid "$GROUP_ID" reposilite; fi USER_ID="${PUID:-999}" - grep "^reposilite" /etc/passwd > /dev/null - if [ $? -ne 0 ] + if ! grep "^reposilite" /etc/passwd; then - adduser --system -uid "$USER_ID" --ingroup reposilite --shell /bin/sh reposilite + adduser --system -uid "$USER_ID" --ingroup reposilite --shell /bin/sh reposilite; fi chown -R reposilite:reposilite /app