1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/baikal_ynh.git synced 2024-09-03 18:16:11 +02:00

fix encrypt_key

This commit is contained in:
Kay0u 2020-03-13 23:48:46 +01:00
parent 192e9f2439
commit 42432469dd
No known key found for this signature in database
GPG key ID: 7FF262C033518333

View file

@ -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