From 91e54cc835e98d6787ab76037e9958dcb39b5245 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 17 Mar 2021 22:35:22 +0100 Subject: [PATCH] Update install --- scripts/install | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 4326777..ad0ab71 100644 --- a/scripts/install +++ b/scripts/install @@ -106,20 +106,24 @@ ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencie #================================================= ynh_script_progression --message="Preconfiguring Ampache..." --weight=2 -conf_file="$final_path/config/ampache.cfg.php" -cp ../conf/ampache.cfg.php "$conf_file" - -ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_file" -ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_file" -ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_file" -ynh_replace_string --match_string="__PATHTOCHANGE__" --replace_string="$path_url" --target_file="$conf_file" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$conf_file" secret_key=$(ynh_string_random --length=24) -ynh_replace_string --match_string="__RANDOMKEYTOCHANGE__" --replace_string="$secret_key" --target_file="$conf_file" ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$conf_file" +# conf_file="$final_path/config/ampache.cfg.php" + +# cp ../conf/ampache.cfg.php "$conf_file" + +# ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$conf_file" +# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$conf_file" +# ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$conf_file" +# ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$conf_file" +# ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$conf_file" +# ynh_replace_string --match_string="__SECRET_KEY__" --replace_string="$secret_key" --target_file="$conf_file" + +# # Calculate and store the config file checksum into the app settings +# ynh_store_file_checksum --file="$conf_file" + +ynh_add_config --template="../conf/ampache.cfg.php" --destination="$final_path/config/ampache.cfg.php" #================================================= # LOAD DEFAULT DATABASE