updater: force adding user/group even if GID/UID is duplicate

This commit is contained in:
Andrew Dolgov 2022-02-20 12:52:21 +03:00
parent c552bb48c9
commit 219913d12b
2 changed files with 7 additions and 3 deletions

View File

@ -10,7 +10,6 @@ unset HTTP_PORT
unset HTTP_HOST unset HTTP_HOST
if ! id app >/dev/null 2>&1; then if ! id app >/dev/null 2>&1; then
# what if i actually need a duplicate GID/UID group? # what if i actually need a duplicate GID/UID group?
addgroup -g $OWNER_GID app || echo app:x:$OWNER_GID:app | \ addgroup -g $OWNER_GID app || echo app:x:$OWNER_GID:app | \

View File

@ -8,8 +8,13 @@ unset HTTP_HOST
sleep 30 sleep 30
if ! id app >/dev/null 2>&1; then if ! id app >/dev/null 2>&1; then
addgroup -g $OWNER_GID app # what if i actually need a duplicate GID/UID group?
adduser -D -h /var/www/html -G app -u $OWNER_UID app
addgroup -g $OWNER_GID app || echo app:x:$OWNER_GID:app | \
tee -a /etc/group
adduser -D -h /var/www/html -G app -u $OWNER_UID app || \
echo app:x:$OWNER_UID:$OWNER_GID:Linux User,,,:/var/www/html:/bin/ash | tee -a /etc/passwd
fi fi
while ! pg_isready -h $TTRSS_DB_HOST -U $TTRSS_DB_USER; do while ! pg_isready -h $TTRSS_DB_HOST -U $TTRSS_DB_USER; do