[SOGo] Allow to turn off GAL for each domain

master
andryyy 2019-01-16 23:41:13 +01:00
parent 8dde735a0a
commit 62ccd4215e
1 changed files with 4 additions and 4 deletions

View File

@ -112,7 +112,7 @@ cat <<EOF > /var/lib/sogo/GNUstep/Defaults/sogod.plist
EOF
# Generate multi-domain setup
while read line
while read -r line gal
do
echo " <key>${line}</key>
<dict>
@ -137,11 +137,11 @@ while read line
<key>canAuthenticate</key>
<string>YES</string>
<key>displayName</key>
<string>GAL</string>
<string>GAL ${line}</string>
<key>id</key>
<string>${line}</string>
<key>isAddressBook</key>
<string>YES</string>
<string>${gal}</string>
<key>type</key>
<string>sql</string>
<key>userPasswordAlgorithm</key>
@ -156,7 +156,7 @@ while read line
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)
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)
# Generate footer
echo ' </dict>