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 <