1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jitsi_ynh.git synced 2024-09-03 19:35:57 +02:00

Add warning for sub-domains creation

This commit is contained in:
yalh76 2019-08-05 21:56:21 +02:00
parent 325530735e
commit 7952829136
3 changed files with 27 additions and 0 deletions

View file

@ -5,6 +5,7 @@
;; Test complet
; Manifest
warning=1
domain="domain.tld" (DOMAIN)
; Checks
pkg_linter=1

View file

@ -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",

View file

@ -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