1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

Apply same default value from install to upgrade

This commit is contained in:
Josué Tille 2024-02-16 23:31:30 +01:00
parent 35f809c5c3
commit c039c3774a
No known key found for this signature in database
GPG key ID: 5F259226AD51F2F5

View file

@ -110,17 +110,17 @@ then
fi fi
if [ -z "$registrations_require_3pid" ] if [ -z "$registrations_require_3pid" ]
then then
registrations_require_3pid="none" registrations_require_3pid=email
ynh_app_setting_set --app=$app --key=registrations_require_3pid --value=$registrations_require_3pid ynh_app_setting_set --app=$app --key=registrations_require_3pid --value=$registrations_require_3pid
fi fi
if [ -z "$allowed_local_3pids_email" ] if [ -z "$allowed_local_3pids_email" ]
then then
allowed_local_3pids_email="'^[^@]+@""matrix""\.org$'" allowed_local_3pids_email=''
ynh_app_setting_set --app=$app --key=allowed_local_3pids_email --value=$allowed_local_3pids_email ynh_app_setting_set --app=$app --key=allowed_local_3pids_email --value=$allowed_local_3pids_email
fi fi
if [ -z "$allowed_local_3pids_msisdn" ] if [ -z "$allowed_local_3pids_msisdn" ]
then then
allowed_local_3pids_msisdn="'\+33'" allowed_local_3pids_msisdn=''
ynh_app_setting_set --app=$app --key=allowed_local_3pids_msisdn --value=$allowed_local_3pids_msisdn ynh_app_setting_set --app=$app --key=allowed_local_3pids_msisdn --value=$allowed_local_3pids_msisdn
fi fi
if [ -z "$account_threepid_delegates_msisdn" ] if [ -z "$account_threepid_delegates_msisdn" ]
@ -168,6 +168,17 @@ then
enable_group_creation="true" enable_group_creation="true"
ynh_app_setting_set --app=$app --key=enable_group_creation --value=$enable_group_creation ynh_app_setting_set --app=$app --key=enable_group_creation --value=$enable_group_creation
fi fi
if [ -z "$enable_3pid_lookup" ]
then
enable_3pid_lookup=false
ynh_app_setting_set --app=$app --key=enable_3pid_lookup --value=$enable_3pid_lookup
fi
if [ -z "$turn_allow_guests" ]
then
turn_allow_guests=false
ynh_app_setting_set --app=$app --key=turn_allow_guests --value=$turn_allow_guests
fi
if [ -z "$enable_registration" ] if [ -z "$enable_registration" ]
then then
@ -178,22 +189,14 @@ then
if [ "$is_free_registration" -eq "0" ] if [ "$is_free_registration" -eq "0" ]
then then
enable_registration="false" enable_registration="false"
turn_allow_guests="false"
sso_enabled="true"
password_enabled="false" password_enabled="false"
enable_3pid_lookup="false"
else else
enable_registration="true" enable_registration="true"
turn_allow_guests="true"
sso_enabled="false"
password_enabled="true" password_enabled="true"
enable_3pid_lookup="true"
fi fi
ynh_app_setting_set --app=$app --key=enable_registration --value=$enable_registration ynh_app_setting_set --app=$app --key=enable_registration --value=$enable_registration
ynh_app_setting_set --app=$app --key=turn_allow_guests --value=$turn_allow_guests
ynh_app_setting_set --app=$app --key=sso_enabled --value=$sso_enabled
ynh_app_setting_set --app=$app --key=password_enabled --value=$password_enabled ynh_app_setting_set --app=$app --key=password_enabled --value=$password_enabled
ynh_app_setting_set --app=$app --key=enable_3pid_lookup --value=$enable_3pid_lookup
fi fi
if [ -z "$push_include_content" ] if [ -z "$push_include_content" ]