From c69448a28941cf6583c067b6bc67fa1b2c2fc0ca Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 26 Apr 2021 23:40:16 +0200 Subject: [PATCH] Remove Sequelizerc --- conf/.sequelizerc.example | 8 -------- scripts/change_url | 22 ++++++++++++---------- scripts/install | 2 -- scripts/upgrade | 2 -- 4 files changed, 12 insertions(+), 22 deletions(-) delete mode 100644 conf/.sequelizerc.example diff --git a/conf/.sequelizerc.example b/conf/.sequelizerc.example deleted file mode 100644 index ddb5cba..0000000 --- a/conf/.sequelizerc.example +++ /dev/null @@ -1,8 +0,0 @@ -var path = require('path'); - -module.exports = { - 'config': path.resolve('config.json'), - 'migrations-path': path.resolve('lib', 'migrations'), - 'models-path': path.resolve('lib', 'models'), - 'url': 'postgres://__DB_NAME__:__DB_PWD__@localhost:5432/__DB_NAME__' -} diff --git a/scripts/change_url b/scripts/change_url index ad20b77..e7553c6 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -110,21 +110,23 @@ fi # CONFIGURE HEDGEDOC #================================================= -ynh_backup_if_checksum_is_different --file="$final_path/config.json" +#ynh_backup_if_checksum_is_different --file="$final_path/config.json" domain=$new_domain -path_url=$new_path +path_url=${new_path:1} -cp ../conf/config.json.example "$final_path/config.json" +# cp ../conf/config.json.example "$final_path/config.json" -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_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" +# 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_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" -ynh_store_file_checksum --file="$final_path/config.json" +# ynh_store_file_checksum --file="$final_path/config.json" + +ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json" #================================================= # GENERIC FINALISATION diff --git a/scripts/install b/scripts/install index 88c4d5e..1f431c7 100644 --- a/scripts/install +++ b/scripts/install @@ -139,8 +139,6 @@ path=${path_url:1} ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json" -ynh_add_config --template="../conf/.sequelizerc.example" --destination="$final_path/.sequelizerc" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ab50ba4..6777d84 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,7 +87,6 @@ then # Backup the config file in the temp dir cp -a "$final_path/config.json" "$tmpdir/config.json" - cp -a "$final_path/.sequelizerc" "$tmpdir/.sequelizerc" # Remove the app directory securely ynh_secure_remove --file=$final_path @@ -97,7 +96,6 @@ then #Copy the admin saved settings from tmp directory to final path cp -a "$tmpdir/config.json" "$final_path/config.json" - cp -a "$tmpdir/.sequelizerc" "$final_path/.sequelizerc" # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir"