From b410246988aa4bd4a00b23f8b6031cb31abe19ff Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 8 Jun 2021 08:56:15 +0200 Subject: [PATCH] Fix --- scripts/install | 8 +++++++- scripts/upgrade | 3 --- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 992b3ab..4dead3c 100644 --- a/scripts/install +++ b/scripts/install @@ -107,7 +107,13 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Configuring Kanboard..." -ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" +cp ../conf/config.php "$final_path/config.php" + +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.php" +ynh_replace_string --match_string="__DB_NAME__" --replace_string=$db_name --target_file="$final_path/config.php" +ynh_replace_string --match_string="__ADMIN__" --replace_string=$admin --target_file="$final_path/config.php" +ynh_replace_string --match_string="__EMAIL__" --replace_string=$email --target_file="$final_path/config.php" +ynh_replace_string --match_string="__DOMAIN__" --replace_string=$domain --target_file="$final_path/config.php" chmod 400 "$final_path/config.php" chown $app "$final_path/config.php" diff --git a/scripts/upgrade b/scripts/upgrade index cf3091c..da0784c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -161,9 +161,6 @@ else ynh_app_setting_set --app=$app --key=unprotected_uris --value="/jsonrpc.php" fi -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$config_php" - #================================================= # RELOAD NGINX #=================================================