From 764b80bf5c29b2c9eb344364b5a2fe8a2a6e341a Mon Sep 17 00:00:00 2001 From: anmol Date: Fri, 23 Oct 2020 09:36:42 +0530 Subject: [PATCH] Store key values if already not set --- scripts/upgrade | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 72ad5b1..d98d120 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -174,6 +174,8 @@ then ynh_replace_string --match_string="__DAV__" --replace_string="false" --target_file="$config" else ynh_replace_string --match_string="__DAV__" --replace_string="true" --target_file="$config" + dav_support=1 + ynh_app_setting_set --app=$app --key=dav_support --value=$dav_support fi # Enable or disable signup for public users if [ $signup -eq 1 ] @@ -181,6 +183,8 @@ then ynh_replace_string --match_string="__SIGNUP__" --replace_string="false" --target_file="$config" else ynh_replace_string --match_string="__SIGNUP__" --replace_string="true" --target_file="$config" + signup=0 + ynh_app_setting_set --app=$app --key=signup --value=$signup fi # Enable or disable two factor authentication support for users if [ $two_factor -eq 1 ] @@ -188,6 +192,8 @@ then ynh_replace_string --match_string="__TWO_FACTOR__" --replace_string="true" --target_file="$config" else ynh_replace_string --match_string="__TWO_FACTOR__" --replace_string="false" --target_file="$config" + two_factor=0 + ynh_app_setting_set --app=$app --key=two_factor --value=$two_factor fi #=================================================