From b6144af8476eb2efd99fb0e60da48f8fc9019501 Mon Sep 17 00:00:00 2001 From: Pascal Date: Sat, 14 Mar 2026 22:58:36 +0100 Subject: [PATCH] add openldap-clients installation --- ldap-auth.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ldap-auth.sh b/ldap-auth.sh index ad6ffe8..6784d8f 100755 --- a/ldap-auth.sh +++ b/ldap-auth.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # ldap-auth.sh - Simple shell script to authenticate users against LDAP @@ -201,6 +201,9 @@ case "$CLIENT" in ldap_auth_curl ;; "ldapsearch") + if [ -z "$(which ldapsearch)" ]; then + apk add openldap-clients + fi ldap_auth_ldapsearch ;; *) @@ -231,7 +234,6 @@ if [ $result -ne 0 ]; then type on_auth_failure > /dev/null && on_auth_failure exit 1 fi - log "User '$username' authenticated successfully." type on_auth_success > /dev/null && on_auth_success exit 0