From 4311d1e98d99726d247b5b9418bb905ae585305e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 20 Feb 2024 21:18:09 +0100 Subject: [PATCH] Add warning when server_name config are not managed by yunohost --- scripts/change_url | 4 ++++ scripts/install | 2 ++ 2 files changed, 6 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index b85f316..39f58c2 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -55,4 +55,8 @@ ynh_script_progression --message="Restarting Synapse services..." --weight=5 ynh_systemd_action --service_name=$app-coturn.service --action=restart ynh_systemd_action --service_name=$app.service --action=restart --line_match="Synapse now listening on TCP port $port_synapse_tls" --log_path="/var/log/matrix-$app/homeserver.log" --timeout=300 +if ! yunohost --output-as plain domain list | grep -q "^$server_name"'$'; then + ynh_print_warn "Note yunohost won't be able to manage the required config for $server_name. So please add the needed DNS config as described on the documentation" +fi + ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/install b/scripts/install index a0dd8df..0f3af06 100644 --- a/scripts/install +++ b/scripts/install @@ -256,6 +256,8 @@ if yunohost --output-as plain domain list | grep -q "^$server_name$"; then ynh_""permission_create --permission=server_client_infos --url=$server_name/.well-known/matrix \ --label="Server info for clients. (well-known)" --show_tile=false --allowed=visitors \ --auth_header=false --protected=true +else + ynh_print_warn "Note yunohost won't be able to manage the required config for $server_name. So please add the needed DNS config as described on the documentation" fi #=================================================