1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-26 00:01:31 +00:00

[SOGo] use bash script for ldap plist template

This commit is contained in:
FreddleSpl0it
2024-02-20 12:42:37 +01:00
parent b3e26e14ef
commit 132e37bfec
4 changed files with 37 additions and 30 deletions

View File

@@ -107,7 +107,7 @@ while read -r line gal
</dict>" >> /var/lib/sogo/GNUstep/Defaults/sogod.plist
# Generate alternative LDAP authentication dict, when SQL authentication fails
# This will nevertheless read attributes from LDAP
line=${line} envsubst < /etc/sogo/plist_ldap >> /var/lib/sogo/GNUstep/Defaults/sogod.plist
/etc/sogo/plist_ldap.sh ${line} ${gal} >> /var/lib/sogo/GNUstep/Defaults/sogod.plist
echo " </array>
</dict>" >> /var/lib/sogo/GNUstep/Defaults/sogod.plist
done < <(mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} -e "SELECT domain, CASE gal WHEN '1' THEN 'YES' ELSE 'NO' END AS gal FROM domain;" -B -N)