From e21060bd5f2dbeb903cfc809c84906ff987094c3 Mon Sep 17 00:00:00 2001 From: Thatoo Date: Mon, 1 Jul 2019 13:16:07 +0200 Subject: [PATCH] .well-known redirection for access by federation If not existing, create .well-known redirection for access by federation --- scripts/upgrade | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 0d9e5e2..4a0ffd0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 < /etc/nginx/conf.d/${domain}.d/name_server.conf <