ayaports/user/codeberg-pages-server/codeberg-pages-server.pre-install
Antoine Martin 0704722b95
Some checks failed
/ lint (pull_request) Failing after 27s
/ deploy-x86_64 (pull_request) Has been skipped
/ build-x86_64 (pull_request) Failing after 1m7s
/ deploy-aarch64 (pull_request) Has been skipped
/ build-aarch64 (pull_request) Failing after 3m26s
user/codeberg-pages-server: new aport
2024-08-22 22:04:29 -04:00

26 lines
580 B
Bash

#!/bin/sh
# It's very important to set user/group correctly.
authentik_dir='/var/lib/authentik'
if ! getent group authentik 1>/dev/null; then
echo '* Creating group authentik' 1>&2
addgroup -S authentik
fi
if ! id authentik 2>/dev/null 1>&2; then
echo '* Creating user authentik' 1>&2
adduser -DHS -G authentik -h "$authentik_dir" -s /bin/sh \
-g "added by apk for authentik" authentik
passwd -u authentik 1>/dev/null # unlock
fi
if ! id -Gn authentik | grep -Fq redis; then
echo '* Adding user authentik to group redis' 1>&2
addgroup authentik redis
fi
exit 0