Change way defaults are written

master
andryyy 2016-12-14 14:53:56 +01:00
parent 5ce0d0bb6c
commit 583cf67f86
2 changed files with 10 additions and 19 deletions

View File

@ -1,5 +1,5 @@
FROM debian:jessie
MAINTAINER Andre Peters <andre.peters@debinux.de>
MAINTAINER Andre Peters <andre.peters@servercow.de>
ENV DEBIAN_FRONTEND noninteractive
@ -10,24 +10,8 @@ RUN apt-get update \
&& apt-get update \
&& apt-get -y --force-yes install sogo sogo-activesync
RUN mkdir -p /var/lib/sogo/GNUstep/Defaults/
RUN echo "<?xml version="1.0" encoding="UTF-8"?> \n\
<!DOCTYPE plist PUBLIC "-//GNUstep//DTD plist 0.9//EN" "http://www.gnustep.org/plist-0_9.xml">\n\
<plist version="0.9">\n\
<dict>\n\
<key>OCSEMailAlarmsFolderURL</key>\n\
<string>mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_alarms_folder</string>\n\
<key>OCSFolderInfoURL</key>\n\
<string>mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_folder_info</string>\n\
<key>OCSSessionsFolderURL</key>\n\
<string>mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_sessions_folder</string>\n\
<key>SOGoProfileURL</key>\n\
<string>mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_user_profile</string>\n\
<key>SOGoUserSources</key>\n\
<string>\(\{type = sql;id = directory;viewURL = mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_view;canAuthenticate = YES;isAddressBook = YES;displayName = \&quot;GAL\&quot;;MailFieldNames = (aliases, ad_aliases, senderacl);userPasswordAlgorithm = ssha256;\}\)</string>\n\
</dict>\n\
</plist>" > /var/lib/sogo/GNUstep/Defaults/sogod.plist
ADD gnustep_defaults.sh /tmp/gnustep_defaults.sh
RUN chmod +x /tmp/gnustep_defaults.sh && /tmp/gnustep_defaults.sh
USER sogo

View File

@ -0,0 +1,7 @@
#!/bin/bash
defaults write sogod SOGoUserSources '({type = sql;id = directory;viewURL = mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_view;canAuthenticate = YES;isAddressBook = YES;displayName = \"GAL\";MailFieldNames = (aliases, ad_aliases, senderacl);userPasswordAlgorithm = ssha256;})'
defaults write sogod SOGoProfileURL 'mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_user_profile'
defaults write sogod OCSFolderInfoURL 'mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_folder_info'
defaults write sogod OCSEMailAlarmsFolderURL 'mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_alarms_folder'
defaults write sogod OCSSessionsFolderURL 'mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_sessions_folder'