From 9b6e002d114a9bcf85f681a5d82e16727cd3b045 Mon Sep 17 00:00:00 2001 From: Alex Palaistras Date: Sun, 25 Sep 2022 13:36:31 +0100 Subject: [PATCH] gitea: Add `lldap` as service dependency --- service/gitea/container/run-gitea | 16 ++++++++-------- service/gitea/systemd/gitea.service | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/service/gitea/container/run-gitea b/service/gitea/container/run-gitea index 1461c19..bf804b7 100755 --- a/service/gitea/container/run-gitea +++ b/service/gitea/container/run-gitea @@ -18,14 +18,14 @@ if ! test -f /var/lib/gitea/gitea.db; then gosu git /usr/bin/gitea -c /etc/gitea/config.ini migrate # Set up LDAP authentication via local service. - gosu git /usr/bin/gitea -c /etc/gitea/config.ini admin auth add-ldap --name "LDAP" \ - --host "${GITEA_AUTH_LDAP_HOST}" --port "${GITEA_AUTH_LDAP_PORT}" \ - --synchronize-users --security-protocol unencrypted \ - --bind-dn "uid=${GITEA_AUTH_LDAP_BIND_UID},ou=people,dc=ldap,dc=local" --bind-password "${GITEA_AUTH_LDAP_BIND_PASSWORD}" \ - --user-search-base "ou=people,dc=ldap,dc=local" --user-filter "(&(memberof=cn=gitea_user,ou=groups,dc=ldap,dc=local)(|(uid=%[1]s)(mail=%[1]s)))" \ - --admin-filter "(memberof=cn=gitea_admin,ou=groups,dc=ldap,dc=local)" \ - --username-attribute "uid" --email-attribute "mail" \ - --firstname-attribute "givenName" --surname-attribute "sn" --avatar-attribute "jpegPhoto" + gosu git /usr/bin/gitea -c /etc/gitea/config.ini admin auth add-ldap \ + --name "LDAP" --host "${GITEA_AUTH_LDAP_HOST}" --port "${GITEA_AUTH_LDAP_PORT}" \ + --synchronize-users --security-protocol unencrypted \ + --bind-dn "uid=${GITEA_AUTH_LDAP_BIND_UID},ou=people,dc=ldap,dc=local" --bind-password "${GITEA_AUTH_LDAP_BIND_PASSWORD}" \ + --user-search-base "ou=people,dc=ldap,dc=local" --user-filter "(&(memberof=cn=gitea_user,ou=groups,dc=ldap,dc=local)(|(uid=%[1]s)(mail=%[1]s)))" \ + --admin-filter "(memberof=cn=gitea_admin,ou=groups,dc=ldap,dc=local)" \ + --username-attribute "uid" --email-attribute "mail" \ + --firstname-attribute "givenName" --surname-attribute "sn" --avatar-attribute "jpegPhoto" fi # Run entrypoint under specific user. diff --git a/service/gitea/systemd/gitea.service b/service/gitea/systemd/gitea.service index 12bf031..884cc36 100644 --- a/service/gitea/systemd/gitea.service +++ b/service/gitea/systemd/gitea.service @@ -1,7 +1,7 @@ [Unit] Description=Gitea Self-Hosted Git Service -Wants=container-build@%N.service container-volume@%N.service -After=container-build@%N.service container-volume@%N.service +Wants=container-build@%N.service container-volume@%N.service lldap.service +After=container-build@%N.service container-volume@%N.service lldap.service [Service] Type=notify