remove install files
This commit is contained in:
parent
f6c84e562f
commit
fe5359e933
4 changed files with 0 additions and 67 deletions
|
@ -11,7 +11,6 @@ depends="nginx"
|
||||||
makedepends="go just"
|
makedepends="go just"
|
||||||
# tests disabled for now
|
# tests disabled for now
|
||||||
options="!check"
|
options="!check"
|
||||||
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-install"
|
|
||||||
source="
|
source="
|
||||||
$pkgname-$pkgver.tar.gz::https://codeberg.org/Codeberg/pages-server/archive/v$pkgver.tar.gz
|
$pkgname-$pkgver.tar.gz::https://codeberg.org/Codeberg/pages-server/archive/v$pkgver.tar.gz
|
||||||
codeberg-pages-server.openrc
|
codeberg-pages-server.openrc
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
group=authentik
|
|
||||||
config_file='/etc/authentik/config.yml'
|
|
||||||
|
|
||||||
setcap 'cap_net_bind_service=+ep' /usr/share/webapps/authentik/server
|
|
||||||
|
|
||||||
if [ $(grep '@@SECRET_KEY@@' "$config_file") ]; then
|
|
||||||
echo "* Generating random secret in $config_file" >&2
|
|
||||||
|
|
||||||
secret_key="$(pwgen -s 50 1)"
|
|
||||||
sed -i "s|@@SECRET_KEY@@|$secret_key|" "$config_file"
|
|
||||||
chown root:$group "$config_file"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${0##*.}" = 'post-upgrade' ]; then
|
|
||||||
cat >&2 <<-EOF
|
|
||||||
*
|
|
||||||
* To finish Authentik upgrade run:
|
|
||||||
*
|
|
||||||
* authentik-manage migrate
|
|
||||||
*
|
|
||||||
EOF
|
|
||||||
else
|
|
||||||
cat >&2 <<-EOF
|
|
||||||
*
|
|
||||||
* 1. Adjust settings in /etc/authentik/config.yml.
|
|
||||||
*
|
|
||||||
* 2. Create database for Authentik:
|
|
||||||
*
|
|
||||||
* psql -c "CREATE ROLE authentik PASSWORD 'top-secret' INHERIT LOGIN;"
|
|
||||||
* psql -c "CREATE DATABASE authentik OWNER authentik ENCODING 'UTF-8';"
|
|
||||||
*
|
|
||||||
* 3. Run "authentik-manage migrate"
|
|
||||||
* 4. Setup admin user at https://<your server>/if/flow/initial-setup/
|
|
||||||
*
|
|
||||||
EOF
|
|
||||||
fi
|
|
|
@ -1 +0,0 @@
|
||||||
codeberg-pages-server.post-install
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/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
Reference in a new issue