user/codeberg-pages-server: new aport
This commit is contained in:
parent
5fe2d0a78b
commit
013f4597b1
7 changed files with 167 additions and 1 deletions
26
user/codeberg-pages-server/codeberg-pages-server.pre-install
Normal file
26
user/codeberg-pages-server/codeberg-pages-server.pre-install
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue