mirror of
https://github.com/YunoHost-Apps/hedgedoc_ynh.git
synced 2024-09-03 19:25:52 +02:00
Remove Sequelizerc
This commit is contained in:
parent
0f7846c8c5
commit
c69448a289
4 changed files with 12 additions and 22 deletions
|
@ -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__'
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue