user/codeberg-pages-server: new aport
Some checks failed
/ lint (pull_request) Failing after 31s
/ build-x86_64 (pull_request) Successful in 2m13s
/ deploy-x86_64 (pull_request) Successful in 27s
/ deploy-aarch64 (pull_request) Has been skipped
/ build-aarch64 (pull_request) Failing after 1m25s

This commit is contained in:
Antoine Martin 2024-08-23 00:12:53 -04:00
parent 5fe2d0a78b
commit 013f4597b1
Signed by: forge
GPG key ID: D62A472A4AA7D541
7 changed files with 167 additions and 1 deletions

View file

@ -0,0 +1,26 @@
#!/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