mirror of
https://github.com/zokradonh/kopano-docker
synced 2025-06-07 16:06:14 +00:00
22 lines
708 B
Bash
22 lines
708 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 default configs and prepare" | ts
|
|
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
|