From 42432469ddf8c1b56b4726074a39f95c779988d0 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 13 Mar 2020 23:48:46 +0100 Subject: [PATCH] fix encrypt_key --- scripts/upgrade | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2386a0a..559facb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -141,7 +141,7 @@ then ynh_replace_string --match_string="__TIMEZONE__" --replace_string="$(cat /etc/timezone)" --target_file="$bk_conf" - password_hash=$(ynh_app_setting_get $app password_hash) + password_hash=$(ynh_app_setting_get --app=$app --key=password_hash) # If the password_hash is not in the app's config, recreate it from the password. if [ -z "$password_hash" ]; then password=$(ynh_app_setting_get --app=$app --key=password) @@ -163,10 +163,11 @@ then ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$bk_conf" ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$bk_conf" ynh_replace_string --match_string="__DBUSER__" --replace_string="$db_name" --target_file="$bk_conf" - db_pwd=$(ynh_app_setting_get $app mysqlpwd) + db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_replace_string --match_string="__DBPASS__" --replace_string="$db_pwd" --target_file="$bk_conf" - deskey=$(ynh_app_setting_get $app deskey) + + deskey=$(ynh_app_setting_get --app=$app --key=encrypt_key) ynh_replace_string --match_string="__DESKEY__" --replace_string="$deskey" --target_file="$bk_conf" # Store the config file checksum into the app settings