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