From 8f12d0011025860ddc99a371f8f34e2460e6630a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 10 Mar 2021 22:11:05 +0100 Subject: [PATCH] Fix --- conf/.sequelizerc.example | 2 +- conf/config.json.example | 2 +- scripts/change_url | 1 - scripts/install | 4 +--- scripts/upgrade | 1 - 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/conf/.sequelizerc.example b/conf/.sequelizerc.example index 3b11976..ddb5cba 100644 --- a/conf/.sequelizerc.example +++ b/conf/.sequelizerc.example @@ -4,5 +4,5 @@ module.exports = { 'config': path.resolve('config.json'), 'migrations-path': path.resolve('lib', 'migrations'), 'models-path': path.resolve('lib', 'models'), - 'url': 'postgres://__DB_USER__:__DB_PWD__@localhost:5432/__DB_NAME__' + 'url': 'postgres://__DB_NAME__:__DB_PWD__@localhost:5432/__DB_NAME__' } diff --git a/conf/config.json.example b/conf/config.json.example index 047dc35..5f6ec2b 100644 --- a/conf/config.json.example +++ b/conf/config.json.example @@ -30,7 +30,7 @@ "addGoogleAnalytics": false }, "db": { - "username": "__DB_USER__", + "username": "__DB_NAME__", "password": "__DB_PWD__", "database": "__DB_NAME__", "host": "localhost", diff --git a/scripts/change_url b/scripts/change_url index d3d3d7a..ba20f9b 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -120,7 +120,6 @@ path_url=${new_path:1} # ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.json" # ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json" # ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="$final_path/config.json" -# ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/config.json" # ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json" # ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.json" # ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json" diff --git a/scripts/install b/scripts/install index fb9f2c7..810b76b 100644 --- a/scripts/install +++ b/scripts/install @@ -141,9 +141,8 @@ path_url=${path_url:1} # ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.json" # ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json" # ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="$final_path/config.json" -# ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/config.json" # ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json" -# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.json" +# ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.json" # ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json" ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json" @@ -152,7 +151,6 @@ ynh_store_file_checksum --file="$final_path/config.json" # cp ../conf/.sequelizerc.example "$final_path/.sequelizerc" # # DB Config File -# ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/.sequelizerc" # ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/.sequelizerc" # ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/.sequelizerc" diff --git a/scripts/upgrade b/scripts/upgrade index 9bbe35f..7504a08 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -141,7 +141,6 @@ fi # # ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.json" # # ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/config.json" # # ynh_replace_string --match_string="__PATH__" --replace_string="${path_url:1}" --target_file="$final_path/config.json" -# # ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/config.json" # # ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config.json" # # ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config.json" # # ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/config.json"