1
0
mirror of https://github.com/zokradonh/kopano-docker synced 2025-06-07 07:56:12 +00:00
2018-04-16 12:18:10 +02:00

23 lines
783 B
Bash

#!/bin/bash
set -eu # unset variables are errors & non-zero return values exit the whole script
mkdir -p /kopano/data/attachments /var/run/kopano
echo "Create /etc/kopano/ldap.cfg and prepare" | ts
cp /usr/share/doc/kopano/example-config/ldap.cfg /etc/kopano/ldap.cfg
sed -e "s|^\s*!include /usr/share/kopano/ldap.openldap.cfg|#!include /usr/sharekopano/ldap.openldap.cfg|" \
-e "s|#!include /usr/share/kopano/ldap.active-directory.cfg|!include /usr/share/kopano/ldap.active-directory.cfg|" \
-i /etc/kopano/ldap.cfg
echo "Configure server core" | ts
/usr/bin/python3 /kopano/configure.py
echo "Set config ownership" | ts
chown -R kopano:kopano /kopano/data /run /tmp
echo "Clean old pid files and sockets" | ts
rm -f /var/run/kopano/*
exec /usr/sbin/kopano-server -F