Fixed matrix.sh with LDAP_DOMAIN_ARRAY

This commit is contained in:
root 2024-03-20 17:11:00 +00:00
parent f2bb2b8fdf
commit e23eaffb3c

View File

@ -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