mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
.well-known redirection for access by federation
If not existing, create .well-known redirection for access by federation
This commit is contained in:
parent
1b9e45b38e
commit
e21060bd5f
1 changed files with 26 additions and 0 deletions
|
@ -240,6 +240,32 @@ then
|
|||
chmod 640 /etc/ssl/private/dh2048.pem
|
||||
fi
|
||||
|
||||
|
||||
#=================================================
|
||||
# MIGRATION 5 : CREATE A .well-known FILE
|
||||
#=================================================
|
||||
|
||||
# Create .well-known redirection for access by federation if it doesn't exist
|
||||
if [[ $server_name != $domain ]]; then
|
||||
if [[ ! -e /var/www/.well-known/${domain}/server_name.json ]]; then
|
||||
cat > /var/www/.well-known/${domain}/server_name.json <<EOF
|
||||
{
|
||||
"m.server": "$domain"
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ ! -e /etc/nginx/conf.d/${domain}.d/name_server.conf ]]
|
||||
cat > /etc/nginx/conf.d/${domain}.d/name_server.conf <<EOF
|
||||
{
|
||||
location /.well-known/matrix/server {
|
||||
alias /var/www/.well-known/${domain}/server_name.json;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue