diff --git a/scripts/config b/scripts/config index 6a4f2c5..ca43f24 100644 --- a/scripts/config +++ b/scripts/config @@ -57,6 +57,19 @@ apply_config() { is_public=${YNH_CONFIG_SYNAPSE_CONFIG_SERVER_CONFIG_IS_PUBLIC:-$is_public} jitsi_server=${YNH_CONFIG_SYNAPSE_CONFIG_CLIENT_CONFIG_JITSI_SERVER:-$jitsi_server} + if [ $report_stats == 1 ]; then + report_stats=true + fi + if [ $report_stats == 0 ]; then + report_stats=false + fi + if [ $allow_public_rooms == 1 ]; then + allow_public_rooms=true + fi + if [ $allow_public_rooms == 0 ]; then + allow_public_rooms=false + fi + ynh_app_setting_set --app $app --key report_stats --value $report_stats ynh_app_setting_set --app $app --key allow_public_rooms --value $allow_public_rooms ynh_app_setting_set --app $app --key is_public --value $is_public diff --git a/scripts/upgrade b/scripts/upgrade index f441395..05860e2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -117,6 +117,16 @@ if [ -z $jitsi_server ]; then ynh_app_setting_set --app=$app --key=jitsi_server --value=$jitsi_server fi +if [ -z $report_stats ]; then + report_stats="false" + ynh_app_setting_set --app=$app --key=report_stats --value=$report_stats +fi + +if [ -z $allow_public_rooms ]; then + allow_public_rooms="false" + ynh_app_setting_set --app=$app --key=allow_public_rooms --value=$allow_public_rooms +fi + #================================================= # INSTALL DEPENDENCIES #================================================= @@ -220,18 +230,6 @@ then fi ynh_print_ON -#================================================= -# MIGRATION 5 : DEFINE UNDEFINED SETTINGS -#================================================= - -if [ -n $report_stats ]; then - report_stats="false" -fi - -if [ -n $allow_public_rooms ]; then - allow_public_rooms="false" -fi - #================================================= # UPDATE SYNAPSE CONFIG #=================================================