user/authentik: add ldap init.d

This commit is contained in:
Antoine Martin 2023-06-21 09:55:39 -04:00
parent 05f9b162ae
commit ac698ae6eb
Signed by: forge
GPG key ID: D62A472A4AA7D541
3 changed files with 36 additions and 1 deletions

View file

@ -3,7 +3,7 @@
pkgname=authentik
pkgver=2023.5.3
pkgrel=0
pkgrel=1
pkgdesc="An open-source Identity Provider focused on flexibility and versatility"
url="https://github.com/goauthentik/authentik"
arch="all"
@ -149,6 +149,8 @@ source="
$pkgname-$pkgver.tar.gz::https://github.com/goauthentik/authentik/archive/refs/tags/version/$pkgver.tar.gz
authentik.openrc
authentik-worker.openrc
authentik-ldap.openrc
authentik-ldap.conf
root-settings-csrf_trusted_origins.patch
"
builddir="$srcdir/"authentik-version-$pkgver
@ -212,6 +214,10 @@ package() {
"$pkgdir"/etc/init.d/$pkgname
install -Dm755 "$srcdir"/$pkgname-worker.openrc \
"$pkgdir"/etc/init.d/$pkgname-worker
install -Dm755 "$srcdir"/$pkgname-ldap.openrc \
"$pkgdir"/etc/init.d/$pkgname-ldap
install -Dm640 "$srcdir"/$pkgname-ldap.conf \
"$pkgdir"/etc/conf.d/$pkgname-ldap
install -Dm640 "$builddir"/authentik/lib/default.yml \
"$pkgdir"/etc/authentik/config.yml
sed -i 's|cert_discovery_dir.*|cert_discovery_dir: /var/lib/authentik/certs|' "$pkgdir"/etc/authentik/config.yml
@ -225,5 +231,7 @@ sha512sums="
84e3582d58a70576bfd2c2d04cc4083721beb2c3c4c015b71bb705439aa5ebf5c36b41220a95d5df8e7154cbfc42aedfb8d1608aab13289af1fb279a8aa0781b authentik-2023.5.3.tar.gz
4defb4fe3a4230f4aa517fbecd5e5b8bcef2a64e1b40615660ae9eec33597310a09df5e126f4d39ce7764bd1716c0a7040637699135c103cbc1879593c6c06f1 authentik.openrc
5d7f28bf5a9f358a0fc3634b2bac6d070c276c3f8181d26fa7e94a17503a4d54556bf7c3207ccd6cb924b81754ed965795d5e2a8aa1af409fd9e32d390ec4cf5 authentik-worker.openrc
351e6920d987861f8bf0d7ab2f942db716a8dbdad1f690ac662a6ef29ac0fd46cf817cf557de08f1c024703503d36bc8b46f0d9eb1ecaeb399dce4c3bb527d17 authentik-ldap.openrc
89ee5f0ffdade1c153f3a56ff75b25a7104aa81d8c7a97802a8f4b0eab34850cee39f874dabe0f3c6da3f71d6a0f938f5e8904169e8cdd34d407c8984adee6b0 authentik-ldap.conf
483befe5e2c90c4f37d5b3ef95ebb99a4208927ee0481e948117a79e36cce110ed53eaa0a9a816cf30ba4c0691b504c9c08d2f9dd7a7bc465a618af260aa1145 root-settings-csrf_trusted_origins.patch
"

View file

@ -0,0 +1,3 @@
AUTHENTIK_HOST=https://example.com
AUTHENTIK_TOKEN=your-authentik-token
AUTHENTIK_INSECURE=true

View file

@ -0,0 +1,24 @@
#!/sbin/openrc-run
name="$RC_SVCNAME"
cfgfile="/etc/conf.d/$RC_SVCNAME"
pidfile="/run/$RC_SVCNAME.pid"
working_directory="/usr/share/webapps/authentik"
command="/usr/bin/authentik-ldap"
command_user="authentik"
command_group="authentik"
start_stop_daemon_args=""
command_background="yes"
output_log="/var/log/authentik/$RC_SVCNAME.log"
error_log="/var/log/authentik/$RC_SVCNAME.err"
depend() {
need authentik
}
start_pre() {
cd "$working_directory"
checkpath --directory --owner $command_user:$command_group --mode 0775 \
/var/log/authentik
export AUTHENTIK_HOST AUTHENTIK_TOKEN AUTHENTIK_INSECURE AUTHENTIK_DEBUG
}