From 38a5744d4af0703065cee454e6c30f3e149ca1fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20B=C4=9Blka?= Date: Mon, 6 Jan 2025 21:19:18 +0100 Subject: [PATCH] simplify and solve some seen issue --- bin/supportconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/supportconfig b/bin/supportconfig index 27df125..35112cc 100755 --- a/bin/supportconfig +++ b/bin/supportconfig @@ -3254,7 +3254,7 @@ ldap_info() { LDAP_CONF="/etc/openldap/ldap.conf" conf_files $OF $LDAP_CONF if [[ -s $LDAP_CONF ]]; then - IPADDRS=$(grep -i '^uri[[:space:]]' $LDAP_CONF | sed -e 's!uri[[:space:]]*!!g;s!ldap://!!g;s!ldaps://!!g;s!ldapi://[[:alnum:][:punct:]]*!!g') + IPADDRS=$(grep -Pio '^uri\s+ldaps?://\K(.*)' $LDAP_CONF) for I in $IPADDRS do IPADDR=$(echo $I | sed -e "s/:[[:digit:]]*//g")