From 583cf67f86c61a3bceacce0d62ac7a272ae6ca73 Mon Sep 17 00:00:00 2001 From: andryyy Date: Wed, 14 Dec 2016 14:53:56 +0100 Subject: [PATCH] Change way defaults are written --- data/Dockerfiles/sogo/Dockerfile | 22 +++------------------- data/Dockerfiles/sogo/gnustep_defaults.sh | 7 +++++++ 2 files changed, 10 insertions(+), 19 deletions(-) create mode 100755 data/Dockerfiles/sogo/gnustep_defaults.sh diff --git a/data/Dockerfiles/sogo/Dockerfile b/data/Dockerfiles/sogo/Dockerfile index df9859d8..108772bb 100644 --- a/data/Dockerfiles/sogo/Dockerfile +++ b/data/Dockerfiles/sogo/Dockerfile @@ -1,5 +1,5 @@ FROM debian:jessie -MAINTAINER Andre Peters +MAINTAINER Andre Peters 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 " \n\ -\n\ -\n\ -\n\ - OCSEMailAlarmsFolderURL\n\ - mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_alarms_folder\n\ - OCSFolderInfoURL\n\ - mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_folder_info\n\ - OCSSessionsFolderURL\n\ - mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_sessions_folder\n\ - SOGoProfileURL\n\ - mysql://${DBUSER}:${DBPASS}@${DBHOST}:3306/${DBNAME}/sogo_user_profile\n\ - SOGoUserSources\n\ - \(\{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;\}\)\n\ -\n\ -" > /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 diff --git a/data/Dockerfiles/sogo/gnustep_defaults.sh b/data/Dockerfiles/sogo/gnustep_defaults.sh new file mode 100755 index 00000000..a93bbd21 --- /dev/null +++ b/data/Dockerfiles/sogo/gnustep_defaults.sh @@ -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' +