mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
set default domain name
This commit is contained in:
parent
0f7b1e3dff
commit
9a0a03f2f8
3 changed files with 11 additions and 6 deletions
|
@ -38,7 +38,8 @@
|
||||||
"en": "If your synapse domain is a subdomain, you can choose a name for your Synapse server to have your matrix user-ids looking like @user:domain.org instead of @user:synapse.domain.org",
|
"en": "If your synapse domain is a subdomain, you can choose a name for your Synapse server to have your matrix user-ids looking like @user:domain.org instead of @user:synapse.domain.org",
|
||||||
"fr": "Si votre domaine pour synapse est un sous-domaine, vous pouvez choisir un nom pour votre serveur Synapse afin que vos identifiants matrix soient @utilisateur:domain.org plutôt que @utilisateur:synapse.domain.org"
|
"fr": "Si votre domaine pour synapse est un sous-domaine, vous pouvez choisir un nom pour votre serveur Synapse afin que vos identifiants matrix soient @utilisateur:domain.org plutôt que @utilisateur:synapse.domain.org"
|
||||||
},
|
},
|
||||||
"example": "domain.org"
|
"example": "domain.org",
|
||||||
|
"default": "Same than the domain"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
|
|
|
@ -32,7 +32,11 @@ report_stats="False"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
server_name=$YNH_APP_ARG_SERVER_NAME
|
if [ $server_name == "Same than the domain" ]; then
|
||||||
|
server_name=$domain
|
||||||
|
else
|
||||||
|
server_name=$YNH_APP_ARG_SERVER_NAME
|
||||||
|
fi
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
path_url="/_matrix"
|
path_url="/_matrix"
|
||||||
final_path="/opt/yunohost/matrix-$app"
|
final_path="/opt/yunohost/matrix-$app"
|
||||||
|
|
|
@ -32,10 +32,6 @@ upstream_version=$(ynh_app_upstream_version)
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get $app special_domain)
|
domain=$(ynh_app_setting_get $app special_domain)
|
||||||
server_name=$(ynh_app_setting_get $app server_name)
|
server_name=$(ynh_app_setting_get $app server_name)
|
||||||
if [ -z $server_name ]; then # for retro compatibility
|
|
||||||
server_name=$domain
|
|
||||||
ynh_app_setting_set $app server_name $domain
|
|
||||||
fi
|
|
||||||
path_url=$(ynh_app_setting_get $app special_path)
|
path_url=$(ynh_app_setting_get $app special_path)
|
||||||
final_path=$(ynh_app_setting_get $app final_path)
|
final_path=$(ynh_app_setting_get $app final_path)
|
||||||
synapse_old_version=$(ynh_app_setting_get $app synapse_version)
|
synapse_old_version=$(ynh_app_setting_get $app synapse_version)
|
||||||
|
@ -61,6 +57,10 @@ then
|
||||||
ynh_die "Update from this synapse version is not available. You need to remove this package and reinstall the new package version."
|
ynh_die "Update from this synapse version is not available. You need to remove this package and reinstall the new package version."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $server_name ]; then
|
||||||
|
server_name=$domain
|
||||||
|
ynh_app_setting_set $app server_name $domain
|
||||||
|
fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE
|
# BACKUP BEFORE UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue