[SOGo] Read plist_ldap for dual auth via ldap, unsupported

This commit is contained in:
andryyy
2018-11-26 09:10:39 +01:00
parent f76c3ee7f3
commit 9acd9c719d
2 changed files with 38 additions and 34 deletions

View File

@@ -113,8 +113,8 @@ EOF
# Generate multi-domain setup
while read line
do
echo " <key>${line}</key>
do
echo " <key>${line}</key>
<dict>
<key>SOGoMailDomain</key>
<string>${line}</string>
@@ -150,8 +150,11 @@ while read line
<string>YES</string>
<key>viewURL</key>
<string>mysql://${DBUSER}:${DBPASS}@%2Fvar%2Frun%2Fmysqld%2Fmysqld.sock/${DBNAME}/_sogo_static_view</string>
</dict>
</array>
</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
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 FROM domain;" -B -N)