lifecycle: check if group of docker socket exists

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-14 00:50:20 +02:00
parent 0fcb4936a2
commit 634ea61b50
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ function check_if_root {
# Get group ID of the docker socket, so we can create a matching group and # Get group ID of the docker socket, so we can create a matching group and
# add ourselves to it # add ourselves to it
DOCKER_GID=$(stat -c '%g' $SOCKET) DOCKER_GID=$(stat -c '%g' $SOCKET)
getent group $DOCKER_GID || groupadd -f -g $DOCKER_GID docker
usermod -a -G $DOCKER_GID authentik usermod -a -G $DOCKER_GID authentik
fi fi
# Fix permissions of backups and media # Fix permissions of backups and media