diff --git a/lib/matrix.sh b/lib/matrix.sh index c6b8c8a..6b1b893 100644 --- a/lib/matrix.sh +++ b/lib/matrix.sh @@ -108,6 +108,13 @@ modules: local_private_key_file: /data/$DOMAIN.key EOF +# Set the ldap configuration correct to the domain +if [ "${#LDAP_DOMAIN_ARRAY[@]}" -eq "3" ]; then + sed -i "s#dc=federatedcomputer,dc=cloud#dc=$LDAP_DOMAIN_FIRST,dc=$LDAP_DOMAIN_MIDDLE,dc=$LDAP_DOMAIN_LAST#g" /federated/apps/matrix/data/matrix/homeserver.yaml +else + sed -i "s#dc=federatedcomputer,dc=cloud#dc=$LDAP_DOMAIN_FIRST,dc=$LDAP_DOMAIN_LAST#g" /federated/apps/matrix/data/matrix/homeserver.yaml +fi + # Set permissions chown -R 991:991 /federated/apps/matrix/data/matrix