From 7952829136dcdf4cdab40c719bc9bfe8452f538e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 5 Aug 2019 21:56:21 +0200 Subject: [PATCH] Add warning for sub-domains creation --- check_process | 1 + manifest.json | 9 +++++++++ scripts/install | 17 +++++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/check_process b/check_process index 93f5530..f6da81d 100644 --- a/check_process +++ b/check_process @@ -5,6 +5,7 @@ ;; Test complet ; Manifest + warning=1 domain="domain.tld" (DOMAIN) ; Checks pkg_linter=1 diff --git a/manifest.json b/manifest.json index 26fc4d0..5a6aa6d 100644 --- a/manifest.json +++ b/manifest.json @@ -22,6 +22,15 @@ ], "arguments": { "install" : [ + { + "name": "warning", + "type": "boolean", + "ask": { + "en": "\nHave you created the required sub domains: auth.jitsi.domain.tld; conference.jitsi.domain.tld; jitsi-videobridge.jitsi.domain.tld; focus.jitsi.domain.tld on you DNS registrar, added them to YunoHost and installed the certificate for each domain?\n\n", + "fr": "\nAvez vous créé les sous-domaines requis: auth.jitsi.domain.tld; conference.jitsi.domain.tld; jitsi-videobridge.jitsi.domain.tld; focus.jitsi.domain.tld dans les DNS de votre registrar, ajouté à votre YunoHost et installé les certificats pour chaque domaine?\n\n" + }, + "default": false + }, { "name": "domain", "type": "domain", diff --git a/scripts/install b/scripts/install index f344bb2..93a220d 100644 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,7 @@ ynh_abort_if_errors # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= +warning=$YNH_APP_ARG_WARNING domain=$YNH_APP_ARG_DOMAIN path_url="/" @@ -45,6 +46,22 @@ ynh_print_info --message="Validating installation parameters..." final_path=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" +# Don't install Jitsi if sub-domains not created +if [ $warning -eq 0 ] +then + ynh_die --message="Before installing Jitsi, you must create several domains in your DNS registrar, add them to YunoHost and create the certificates \n\ +So as you choose $domain for your jitsi instance, create auth.$domain; conference.$domain; jitsi-videobridge.$domain; focus.$domain in your DNS registrar \n\ +When working execute: \n\ +yunohost domain add auth.$domain \n\ +yunohost domain add conference.$domain \n\ +yunohost domain add jitsi-videobridge.$domain \n\ +yunohost domain add focus.$domain \n\ +yunohost domain cert-install auth.$domain \n\ +yunohost domain cert-install conference.$domain \n\ +yunohost domain cert-install jitsi-videobridge.$domain \n\ +yunohost domain cert-install focus.$domain \n" +fi + # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url