From 6df290deab649081ccbd1fd64c1715521125f11f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 8 Mar 2021 22:18:09 +0100 Subject: [PATCH] Fix --- conf/settings.example.php | 4 ++-- scripts/install | 14 +++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/conf/settings.example.php b/conf/settings.example.php index f739b8a..3d03de9 100644 --- a/conf/settings.example.php +++ b/conf/settings.example.php @@ -434,6 +434,6 @@ $settings['backdrop_drupal_compatibility'] = TRUE; * * Keep this code block at the end of this file to take full effect. */ -if (file_exists(__FINALPATH__ . '/settings.local.php')) { - include __FINALPATH__ . '/settings.local.php'; +if (file_exists(__DIR__ . '/settings.local.php')) { + include __DIR__ . '/settings.local.php'; } diff --git a/scripts/install b/scripts/install index 9561c08..c73facc 100644 --- a/scripts/install +++ b/scripts/install @@ -96,17 +96,13 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Configuring Backdrop..." --weight=1 -salt=$(ynh_string_random --length=30) +cp ../conf/settings.example.php "$final_path/settings.php" -# cp ../conf/settings.example.php "$final_path/settings.php" +# Change variables in ttrss configuration +ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/settings.php" +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/settings.php" +ynh_replace_string --match_string="__SALT__" --replace_string="$(ynh_string_random --length=30)" --target_file="$final_path/settings.php" -# # Change variables in ttrss configuration -# ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/settings.php" -# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/settings.php" -# ynh_replace_string --match_string="__SALT__" --replace_string="$(ynh_string_random --length=30)" --target_file="$final_path/settings.php" -# #ynh_replace_string --match_string="__DOMAIN__" --replace_string="https://$domain$path_url" --target_file="$final_path/config.php" - -ynh_add_config --template="../conf/settings.example.php" --destination="$final_path/settings.php" # Recalculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$final_path/settings.php"